MATERIAL AND ENERGY BALAN CIN G IN THE P R O C E S S INDUSTRIES From Microscopic Balances to Large Plants
COMPUTER-AIDED CHEMICAL ENGINEERING Advisory Editor: L.M. Rose Volume 1: Volume 2: Volume 3: Volume 4:
Distillation Design in Practice (L.M. Rose) The Art of Chemical Process Design (G.L. Wells and L.M. Rose) Computer-Programming Examples for Chemical Engineers (G. Ross) Analysis and Synthesis of Chemical Process Systems (K. Hartmann and K. Kaplick) Volume 5: Studies in Computer-Aided Modelling, Design and Operation Part A: Unit Operations (1. Pallai and Z. Fony6, Editors) Part B: Systems (1. Pallai and G.E. Veress, Editors) Volume 6: Neural Networks for Chemical Engineers (A.B. Bulsari, Editor) Volume 7: Material and Energy Balancing in the Process Industries - From Microscopic Balances to Large Plants (V.V. Veverka and F. Madron)
COMPUTER-AIDED CHEMICAL ENGINEERING, 7
MATERIAL A N D E N E R G Y B A L A N C I N G IN THE P R O CES S I N D U STRIES From Microscopic Balances to Large Plants
Vladimir V. Veverka Franti~ek Madron
ChemPlant Technology, Ostf nad Labem, Czech Republic
1997 ELSEVIER Amsterdam
--
Lausanne
--
New York --
Oxford
--
Shannon
--
Tokyo
ELSEVIER SCIENCE B.V. Sara Burgerhartstraat 25 P.O. Box 211, 1000 AE Amsterdam, The Netherlands
ISBN: 0-444-82409-x 91997 Elsevier Science B.V. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher, Elsevier Science B.V., Copyright & Permissions Department, P.O. Box 521, 1000 AM Amsterdam, The Netherlands. Special regulations for readers in the USA - This publication has been registered with the Copyright Clearance Center Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923. Information can be obtained from the CCC about conditions under which photocopies of parts of this publication may be made in the USA. All other copyright questions, including photocopying outside of the USA, should be referred to the copyright owner, Elsevier Science B.V., unless otherwise specified. No responsibility is assumed by the publisher 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. This book is printed on acid-free paper. Printed in The Netherlands
Contents Chapter 1
Introduction
Chapter 2
Balancing in Process Industries . . . . . . . . . . . . . . . . . . 2.1 The Problem Statement . . . . . . . . . . . , ....... 2.2 Balancing F l o w s h e e t - Graph Representation . . . . 2.3 Balancing Variables and Data Preprocessing . . . . 2.4 Data Reconciliation . . . . . . . . . . . . . . . . . . . . . . 2.5 Classification of Variables . . . . . . . . . . . . . . . . . 2.6 Data Collection and Processing . . . . . . . . . . . . . 2.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . . .
7 7 12 15 19 20 22 24
Chapter 3
Mass (Single-Component) B a l ~ c e ................ 3.1 Steady-State Mass Balance and its Graph Representation . . . . . . . . . . . . . . . 3.2 More on Solvability . . . . . . . . . . . . . . . . . . . . . 3.2.1 Partition of variables and equations . . . . . . 3.2.2 Transformations . . . . . . . . . . . . . . . . . . 3.3 Observability and Redundancy . . . . . . . . . . . . . . 3..3.1 Definitions and criteria . . . . . . . . . . . . . . 3.3.2 Classification methods and transformation of equations . . . . . . . 3.4 Illustrative Example . . . . . . . . . . . . . . . . . . . . . 3.5 Just Determined Systems . . . . . . . . . . . . . . . . . . 3.6 Main Results of Chapter 3 . . . . . . . . . . . . . . . . . 3.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
25
39 42 49 55 58
Multicomponent Balancing . . . . . . . . . . . . . . . . . . . . . 4.1 Chemical Reactions and Stoichiometry . . . . . . . . 4.2 C o m p o n e n t Mass Balances . . . . . . . . . . . . . . . . . 4.3 Reaction Invariant Balances . . . . . . . . . . . . . . . . 4.4 Element Balances . . . . . . . . . . . . . . . . . . . . . . . 4.5 Reaction Invariant Balances in a System of Units . 4.6 E x a m p l e of Multicomponent Balance . . . . . . . . . 4.7 Unsteady-State Balances . . . . . . . . . . . . . . . . . . 4.8 Main Results of Chapter 4 . . . . . . . . . . . . . . . . . 4.9 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
59 59 63 70 77 79 83 87 91 96
Chapter 4
.................................
25 31 31 34 37 37
vi
Chapter 5
Material and Energy Balancing in the Process Industries
Energy Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enthalpy Balance . . . . . . . . . . . . . . . . . . . . . . . 5.1 Graph and Matrix Representation 5.2 of the Enthalpy Balance . . . . . . . . . . . . . . . . . . . Example of Enthalpy Balance . . . . . . . . . . . . . . . 5.3 Heat and Mass Balancing . . . . . . . . . . . . . . . . . . 5.4 Remarks on Solvability . . . . . . . . . . . . . . . . . . . 5.5 Unsteady Energy Balance . . . . . . . . . . . . . . . . . 5.6 Main Results of Chapter 5 . . . . . . . . . . . . . . . . . 5.7 Recommended Literature . . . . . . . . . . . . . . . . . . 5.8
108 111 118 123 124 127 132
Chapter 6
Entropy and Exergy Balances . . . . . . . . . . . . . . . . . . . 6.1 Exergy and Loss of Exergy . . . . . . . . . . . . . . . . 6.2 Simple Examples . . . . . . . . . . . . . . . . . . . . . . . 6.3 Examples of Exergetic Analysis . . . . . . . . . . . . . 6.3.1 Heat exchanger network . . . . . . . . . . . . . 6.3.2 Distillation unit . . . . . . . . . . . . . . . . . . . 6.3.3 Heating furnace . . . . . . . . . . . . . . . . . . . 6.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . 6.5 Recommended Literature . . . . . . . . . . . . . . . . . .
135 135 137 170 170 172 173 175 176
Chapter 7
Solvability and Classification of Variables I Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 General Analysis . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Canonical Format of the System of Equations 7.3 Commentary and Examples . . . . . . . . . . . . . . . . 7.4 Main Results of Chapter 7 . . . . . . . . . . . . . . . . . 7.5 Recommended Literature . . . . . . . . . . . . . . . . . .
177 177 184 191 196 199
Chapter 8
99 99
...
Solvability and Classification of Variables II Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Simple Examples . . . . . . . . . . . . . . . . . . . . . . . 8.2 Solvability of Multicomponent Balance Equations 8.2.1 Transformation of the equations . . . . . . . 8.2.2 Additional hypotheses . . . . . . . . . . . . . . 8.2.3 Independent variables . . . . . . . . . . . . . . 8.2.4 Degrees of freedom . . . . . . . . . . . . . . . . 8.2.5 Solution manifold . . . . . . . . . . . . . . . . . 8.2.6 Remarks . . . . . . . . . . . . . . . . . . . . . . . . 8.2.7 Example . . . . . . . . . . . . . . . . . . . . . . . . General Solution Manifold . . . . . . . . . . . . . . . . . 8.3 8.3.1 Energy balance equations . . . . . . . . . . . .
201 201 213 213 217 224 228 234 235 238 244 244
vii
8.4 8.5
8.6 8.7
Chapter 9
Chapter 10
Chapter 11
8.3.2 The whole system of balance equations 8.3.3 Heat exchangers . . . . . . . . . . . . . . . . . . 8.3.4 Heat and mass balances . . . . . . . . . . . . . 8.3.5 General nonlinear models . . . . . . . . . . . . Jacobi Matrix and Linearisation . . . . . . . . . . . . . Classification Problems; Observability and Redundancy . . . . . . . . . . . . . . 8.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . 8.5.2 Theoretical analysis . . . . . . . . . . . . . . . . 8.5.3 Theoretical classification . . . . . . . . . . . . 8.5.4 Classification in practice . . . . . . . . . . . . Main Results of Chapter 8 . . . . . . . . . . . . . . . . . R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
..
250 251 255 257 258 265 265 270 277 284 288 295
Balancing Based on Measured D a t a - Reconciliation I Linear Reconciliation . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . 9.2 Reconciliation Formulae . . . . . . . . . . . . . . . . . . 9.3 Statistical Characteristics of the Solutions; Propagation of Errors . . . . . . . . . . . . . . . . . . . . 9.4 Gross Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.5 Systematic Errors . . . . . . . . . . . . . . . . . . . . . . . 9.6 Main Results of Chapter 9 . . . . . . . . . . . . . . . . . 9.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
312 329 342 345 350
Balancing Based on Measured D a t a - Reconciliation II Nonlinear Reconciliation . . . . . . . . . . . . . . . . . . . . . . 10.1 Simple Examples and Problem Statement . . . . . . 10.2 Conditions of M i n i m u m . . . . . . . . . . . . . . . . . . . 10.3 Properties of the Solution . . . . . . . . . . . . . . . . . 10.4 Methods of Solution . . . . . . . . . . . . . . . . . . . . . 10.4.1 Improving the initial guess . . . . . . . . . . . 10.4.2 Suboptimal reconciliation . . . . . . . . . . . . 10.4.3 Final reconciliation . . . . . . . . . . . . . . . . 10.4.4 Short-cut method . . . . . . . . . . . . . . . . . . 10.4.5 Remarks . . . , . . . . . . . . . . . . . . . . . . . . 10.5 Gross Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.7 Main Results of Chapter 10 . . . . . . . . . . . . . . . . 10.8 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
353 353 364 367 374 374 376 380 384 387 394 399 409 414
Dynamic Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Mass Balance Model with Accumulation . . . . . . .
417 417
297 297 303
viii
Chapter 12
Chapter 13
Material and Energy Balancing in the Process Industries
11.2 Daily Balancing . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Recommended Literature . . . . . . . . . . . . . . . . . .
422 434 435
Measurement Planning and Optimisation . . . . . . . . . . . 12.1 Single-Component Balancing . . . . . . . . . . . . . . . 12.1.1 Finding the first solution . . . . . . . . . . . . 12.1.2 Optimal measurement placement from the standpoint of measurement precision 12.2 The General Case . . . . . . . . . . . . . . . . . . . . . . . 12.2.1 Problem statement . . . . . . . . . . . . . . . . . 12.2.2 Objective functions . . . . . . . . . . . . . . . . 12.2.3 Theory . . . . . . . . . . . . . . . . . . . . . . . . . 12.2.4 Solution of the problem . . . . . . . . . . . . . 12.2.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . 12.2.6 Example . . . . . . . . . . . . . . . . . . . . . . . . 12.2.7 Optimality of the solution . . . . . . . . . . . . 12.3 Main Results of Chapter 12 . . . . . . . . . . . . . . . . 12.4 Recommended Literature . . . . . . . . . . . . . . . . . .
437 437 438 .
440 441 441 442 443 444 447 449 452 453 454
Mass and Utilities Balancing with Reconciliation in Large Systems A Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 13.1 The Problem Statement . . . . . . . . . . . . . . . . . . . 457 13.2 Requirements on the Industrial Balancing System . 460 13.3 Important Attributes of an Industrial Balancing System463 13.4 Balancing Errors . . . . . . . . . . . . . . . . . . . . . . . . 465 13.4.1 Mistakes in the balance flowsheet - topology errors . . . . . . . . . . . . . . . . . . 465 13.4.2 Analysis of balance inconsistency - balance differences . . . . . . . . . . . . . . . 467 13.4.3 Identification of the cause of a gross error 468 13.5 Structure of the Balancing System IBS . . . . . . . . 469 13.6 Configuration of the Balancing System - A Case Study . . . . . . . . . . . . . . . . . . . . . . . . . 472 13.7 Examples of Balancing Proper . . . . . . . . . . . . . . 475 13.7.1 Correct balance - the base case . . . . . . . . . . . . . . . . . . . 475 13.7.2 Balancing with a gross error . . . . . . . . . . 477 13.7.3. Some quantities unobservable . . . . . . . . . 478 13.7.4 Topology e r r o r - some streams missing . . 479 13.7.5 Topology errors - too many fixed streams 480 13.7.6 Reporting . . . . . . . . . . . . . . . . . . . . . . . 481
ix 13.8
13.9
Experience with C o m p a n y - W i d e Mass and Utilities Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.8.1 Balancing in operating plants . . . . . . . . . 13.8.2 Implementation of a company-wide balancing system . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . .
481 482 482 485
A p p e n d i x A Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Subgraphs and Connectedness, Circuits and Trees A.2.1 Subgraphs and connected components . . . A.2.2 Connected graphs, circuits, trees . . . . . . . A.3 Properties of the Incidence Matrix . . . . . . . . . . . A.3.1 Case when G is a tree . . . . . . . . . . . . . . A.3.2 General connected graph, elimination of circuits . . . . . . . . . . . . . . . . . . . . . . . A.4 Graph Operations . . . . . . . , ............... A.4.1 Finding connected components . . . . . . . . A.4.2 Derived operations . . . . . . . . . . . . . . . . . A.4.3 Merging of nodes . . . . . . . . . . . . . . . . . A.5 Costed Graphs . . . . . . . . . . . . . . . . . . . . . . . . . A.6 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
487 487 491 491 493 497 498
Appendix B Vectors and Matrices . . . . . . . . . . . . . . . . . . . . . . . . . B.1 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . .
515 515 518 521 523 526 532 538 543 551 554 562
B.2 B.3 B.4 B.5 B.6 B.7 B.8 B.9 B.10 B.11
Dimension and Bases . . . . . . . . . . . . . . . . . . . . Vector Subspaces . . . . . . . . . . . . . . . . . . . . . . . Classical Vector Spaces . . . . . . . . . . . . . . . . . . . Linear Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . More on Matrices; Elimination . . . . . . . . . . . . . . Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . Symmetric Matrices . . . . . . . . . . . . . . . . . . . . . Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . Determinants . . . . . . . . . . . . . . . . . . . . . . . . . .
A p p e n d i x C Differential Balances . . . . . . . . . . . . . . . . . . . . . . . . . C.1 Material Continuum . . . . . . . . . . . . . . . . . . . . . C.2 Interface Balances . . . . . . . . . . . . . . . . . . . . . . . C.3 Thermodynamic Consistency . . . . . . . . . . . . . . . C.4 Exact Integral Balances . . . . . . . . . . . . . . . . . . . C.5 Electrochemical Processes . . . . . . . . . . . . . . . . . C.6 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
500 503 503 506 506 507 513
571 571 575 576 578 582 584
X
Material and Energy Balancing in the Process Industries
A p p e n d i x D Differential form of the 2nd Law of Thermodynamics . . D.1 Recommended Literature . . . . . . . . . . . . . . . . . .
585 588
Appendix E Probability and Statistics . . . . . . . . . . . . . . . . . . . . . .
589 589 597
E.1 E.2 Appendix F
Random Variables and their Characteristics . . . . . Special Probability Densities . . . . . . . . . . . . . . .
Exercises
609
List of Symbols
623
Subject Index
633
Chapter 1 INTRODUCTION
Material and energy balancing belongs to very frequent chemical engineering activities. In spite of this fact, a systematic treatment of this topic in the form of a monograph is quite rare. Balancing also usually forms one or more introductory chapters in general chemical engineering textbooks, but the limited space available there usually makes not possible to cover this subject in depth. The classical treatment of balances in the literature available (which was excellent at the time of publishing) needs to be complemented nowadays for several reasons. Balancing belonged to the first successful use of computers in chemical engineering in early sixties. Since then the spread of computers (and especially personal computers) influenced balancing significantly. The classical steady state balancing in the stage of process design now represents only a part of balancing problems we can meet in practice. Mass and energy balancing (accounting) now becomes to be a standard feature of plant information systems as a part of efforts to guarantee good housekeeping of operating plants. Process plants very often represent complex systems linked to one another to enable functioning in the most efficient way. The automatic computerised analysis and synthesis of balancing relations among hundreds or thousands of process streams requires a systematic approach respecting all possible situations which can occur in practice. This fact brought the need for new balancing techniques based on graph theory and
statistics. The other important feature of balancing calculations is the danger of
insufficient accuracy of results. Unmeasured flows and concentrations calculated on the basis of imprecise data are in most cases differences of big numbers. This fact influences adversely the accuracy of results and in some situation makes them useless. The confidence intervals should be an integral part of balancing results based on imprecise data. Even more dangerous is the possible occurrence of gross measurement errors which can devalue results even more seriously. The problems of confidence intervals and gross errors detection and elimination can be solved by data reconciliation. Instrumentation in process plants is very often not sufficient for setting up detailed and reliable balances. Design and maintenance of instrumentation systems is strongly influenced by control engineers with the primary target of process control. To improve situation in this area new techniques of instrumenta-
2
Material and Energy Balancing in the Process Industries
tion design and optimisation for balancing purposes are now available (optimum measuring placement). Retrofitting and revamping of operating plants is now important part of investment to process industries. The new design of the plant relies heavily on underlying process data. Material and energy balances needed for retrofitting and revamps must be much more detailed than is common in regular plant operation. Special plant tests are run with additional (portable) instrumentation. The reliability and completeness of balances influences the success of overall project significantly. Increased interest in energy conservation in large systems requires a systematic approach to consistent problem definition. Particularly successful is the use of pinch technology. The application of pinch technology to existing plants (revamps) depends on reliable heat and energy balances. The Classical energy (or enthalpy) balances are now complemented by balancing of entropy and exergy (availability). There are also new balancing techniques used in the process control (dynamic balances, instrumentation design and maintenance, etc.). Advanced control techniques incorporated in process computers are very often based not only on directly measured variables but also on secondary variables calculated from balance models. The present book will complement the information present in classical balancing literature by the following topics: systematic analysis of large systems by Graph theory comprehensive thermodynamic analysis (entropy and availability) balancing on the basis of redundant raw plant data (reconciliation, propagation of random measurement errors, detection and elimination of gross errors) measurement design and optimisation (optimal measurement placement) dynamic balancing experience with plant-wide regular mass and energy balancing as a part of plant's process information system. The structure of the book is as follows: The most elementary and unequivocal balance of a technological system is its mass balance, dealt with in Chapter 3. Although the balance of a node (unit of the system) is almost trivial (mass in = mass out + possible accumulation), the fact that the individual nodes are connected by streams where output stream from one unit becomes input stream into another unit gives rise to a complex structure represented by the graph of the system. The methods of Graph theory enable one to analyse completely the problems of solvability in a mathematically precise
Chapter 1- Introduction
3
manner. They are treated rather extensively with the aim to give the reader an idea of the basic concepts used henceforth: the graph representation, the partition of the streams into measured and unmeasured, solvability conditions, observability and redundancy. Generally, the streams are mixtures of several chemical species (components of the mixture). The multicomponent balancing is dealt with in Chapter 4. Certain nodes of the system can be reaction nodes. Having specified the chemical reactions considered admissible in a reaction node, by the laws of chemical stoichiometry the balance of a reacting species involves a source term due to the (positive or negative) production of the species by the reactions. Using an algebraic procedure described in Section 4.3, the (usually a priori unknown) source terms can be eliminated giving a set of'reaction invariant balances'; so the number of unknown variables (parameters) is reduced. Of main interest are steady-state balances neglecting the terms due to accumulation in the nodes. The formulation of an unsteady-state balance brings no theoretical problem (see Section 4.7); specified is the balance of a batch reactor. The exact energy balance (Chapter 5) is only hypothetical. In practice, less relevant items (such as kinetic and potential energy) are neglected and neglecting also the accumulation terms, we have the steady-state enthalpy balance. Each material stream is assigned its specific enthalpy with the condition that the specific enthalpies are thermodynamically consistent. In addition we introduce net energy streams representing heat transfer or also mechanical power supply completing the balance of any node. For the case that only total mass is balanced along with energy (enthalpy), a simplified version of the balance is presented in Section 5.4 (heat and mass balancing); an important special case is a heat exchanger network. For completeness, in Section 5.6 we give general form and examples of unsteady energy balance. Of different nature is the entropy balance dealt with in Chapter 6. It is not a balance in the proper sense because no quantity is conserved. In fact it is a method of thermodynamic analysis of the processes in the system. More familiar to engineers is the notion of exergy (availability). The (necessarily positive) production of entropy in any node is proportional to the loss of exergy in the node; the goal is to reduce the loss as far as possible. The chapter gives a number of examples of such thermodynamic analysis, along with critical comments. Chapters 7 and 8 are devoted to the problems of solvability. We call a set of equations solvable when there exists some vector of solutions, not necessarily unique. In Chapter 3, we have shown that the set of mass balance equations is always solvable if no variable has been fixed a priori. With redundant measured variables, the equations need not be (and usually are not) solvable, unless the fixed variables have been adjusted. Then certain unknown (unmeasured) variables are uniquely determined (observable), other still not (unobservable variables). Certain measured variables can be nonredundant: they
4
Material and Energy Balancing in the Process Industries
are not affected by the solvability conditions thus their values are arbitrary. The set of mass balance equations is an example of a linear system. In Chapter 7 we analyse the solvability of a linear system in general, using the methods of linear algebra. In particular we transform the equations to (what we call the) canonical format (Section 7.2) and give explicit criteria for the solvability classification. The main goal is to give methods that can be applied to the (considerably more difficult) analysis of non-linear systems. The multicomponent chemical species and energy balances are mostly non-linear in the primary variables (mass flowrates, mass fractions, temperatures, possibly also pressures of the streams). The solvability analysis of non-linear systems in Chapter 8 begins with examples showing that even in simple cases, the terminology introduced for linear systems (in particular observability and redundancy) becomes somewhat vague: certain problems can be 'not well-posed'. We then first analyse the solvability of the whole system of balance equations without a priori fixed variables (Sections 8.2 and 8.3) and show that under certain plausible structural hypotheses, the system is solvable. If the values of certain variables have been fixed a priori (for example measured), there is no mathematically precise general solution to the observability and redundancy classification problem. We did not attempt to arrive at a complete analysis. Still, we have shown that remitting somewhat the mathematical precision, a pragmatically plausible classification is possible if the problem is linearized. In Chapters 9 and 10, we deal with balancing based on measured data. The measured data are subject to random errors, and are processed by statistical methods. A statistically rigorous approach is possible if the balance constraints are linear; see Chapter 9. The measured data are first adjusted so as to obey the solvability conditions and minimise the generalised sum of squares of the adjustments; the procedure is called reconciliation. In particular if the distribution of measurement errors is Gaussian with zero mean, we thus obtain the maximum likelihood estimates. Also the estimates of the unmeasured observable variables can then be computed. Even if the distribution is not Gaussian, we can compute statistical characteristics (in particular standard deviations) of the estimates (and possibly also of other variables dependent linearly on the former). With a Gaussian distribution, the confidence intervals for the estimates are thus found. Important is the fact that the presence of redundant measured variables generally improves the precision of the results. On the other hand a measurement error in one variable affects also the estimates of other variables (so-called propagation of errors); in particular the presence of gross errors can spoil the whole result of reconciliation. Methods of detection and elimination of gross errors can be based on the statistical analysis of data; see Section 9.4. A rigorous formulation of the reconciliation problem is possible even with non-linear constraints; only the general existence and uniqueness of a
Chapter
1 -
Introduction
5
solution is not warranted theoretically. Still, with possible exception of considerable gross errors or inadequate selection of the measured variables the problem appears as solvable in practice as shown in Chapter 10. The methods are based on successive approximations (such as successive quadratic programming), where the special character of the criterion to be minimised can be made use of; see Section 10.4. Although not rigorous from the statistical point of view, the approximate statistical characteristics of the estimates can be computed if the constraints are linearised at the final solution. The latter linearisation makes also possible to classify the variables according to Subsection 8.5.4 of Chapter 8. Finally the methods of detection and elimination of gross errors according to Chapter 9 can be applied to the linearised system of equations (Section 10.5). Chapter 11 deals with dynamic (unsteady-state) mass balancing of a technological system involving inventories. A straightforward method of reconciliation is presented avoiding accumulation of small systematic errors in the time series of measurements. The method has proved successful in practice and can also be supported by theoretical arguments. There is generally a great number of possibilities how to select the set of values to be measured, thus the measuring points. The criteria of optimality and the ways leading towards an optimum are analysed in Chapter 12. A more or less heuristic procedure is suggested eliminating successively measuring points that involve high costs and/or give unprecise estimates of the required quantities. If theories and methods presented in the book should to be successful in the practice, many prerequisites must be fulfilled. Typical example of the complexness of the problem can be regular (e.g. daily) balancing in process plants based on measured data. Chapter 13 deals with problems which can be encountered in regular balancing of mass and utilities in refinery and petrochemical complexex. The analysis of the problem is complemented by the experience gained during development and implementation of mass and utilities balancing with reconciliation in the framework of company's process information system. It is the intention of authors to present balancing techniques in a systematic and rigorous way. To make the book at the same time more readable, some parts are included in 5 Appendices. The appendices A,B, and E will enable the reader to brush up and possibly extend his knowledge of graph theory, vector and matrix algebra, and statistical theory pertaining to the problems of balancing. For the interested reader's convenience, the theory is presented in a largely selfcontained manner, with (at least outlined) mathematical proofs. In perusing Chapters 3-8, the reader can manage with Appendix A and Sections B.1-8 of Appendix B. Sections B.9-11 and Appendix E constitute the theoretical basis of Chapters 9-11. The subtitle of the book reads 'From microscopic balances to large plants'. The first part of the promise is fulfilled in Appendices C and D. If the reader is more deeply interested in the physics underlying the ('macroscopic') node balances, before perusing Chapters 4 and 5 he can begin with Appendix C,
6
Material and Energy Balancing in the Process Industries
and with Appendix D before Chapter 6. He will then perhaps better understand the complex nature of the processes in the technological units, and the (necessary) simplifications adopted in setting-up the balances of a technological system. There are many examples throughout the book which serves for better understanding of theory presented there. To gain more practice in solving balancing problems, Appendix F presents several exercises dealing mostly with balancing with reconciliation. The exercises are used in reconciliation courses given by one of the authors of the book. Unfortunately, the data reconciliation is out of reach of the power of pocket calculators even for very simple flowsheets. If the reader wants to go through the workshop based on Appendix F, he can obtain (free of charge) mass and heat balancing software RECON suitable for IBM compatible personal computers (see the coupon at the end of the book). This software is sufficient for the complete solution of exercises including the statistical analysis of data.
Chapter 2 BALANCING IN PROCESS INDUSTRIES 2.1
THE PROBLEM STATEMENT
Let's start with several simple examples illustrating basic balancing tasks encountered in different branches of process industries (refineries, petrochemical plants, inorganics, etc.). Fig. 2-1. depicts a simple scheme for a mass balance. Besides the distillation column (1) and a distillate storage tank (2), the scheme comprises also more complex subsystems of apparatuses which are balanced here as "black boxes". Node (5) represents here a distributor of electric energy supply.
2
3
12 I .....................................
3
'I
"-O I I
Fig. 2-1. A flowsheet for a single-component balance
Streams are usually classified as process streams (streams 1 to 8) and utilities, such as electricity or cooling water (streams 9 to 11). This classification is useful, because process streams usually don't mix with utilities. Systems of balancing equations of process streams and of individual utilities are often independent and can be solved separately. The classification of the stream (12)
8
Material and Energy Balancing in the Process Industries
is problematic. In the subsystem (4) arises the process off-gas which is further led to the subsystem (3) to be burned in a furnace; so it becomes here a utility stream. The most simple balance of the system in a certain (usually integral) time interval means the complete information about exchange of balanced quantities (overall mass, components, different forms of energy, etc.) among separate elements (nodes) of the system or among nodes and the environment inventories of balanced quantities in nodes at the beginning and at the end of the balancing interval, or how the inventories have changed (accumulation) At this moment we are interested in the overall mass flows in the case of mass streams (for example in tons) and electric energy (for example in GWh). We are not interested in other characteristics of streams as chemical composition, because it can be supposed that the quality of the individual streams is guaranteed by the control system. Balance equations for this problem can be expressed as sum of inputs = sum of outputs + increase of inventory for every node in the system. It is the case of so-called single component balance when there is one balancing equation around any node. The balance can be also classified as dynamic because the process need not be at steady state as we admit the change of inventory in the tank (2). The incentive for setting up the balance in such system is regular monitoring of yields of main products and of specific consumption of utilities as a part of "good house keeping" of the plant. Let's consider the second flowsheet in Fig. 2-2. where is the distillation/absorption train for processing of refinery off-gases. Refinery off-gas (1) consists of light hydrocarbons (C1 to C7), hydrogen and inert gases (N2, Ar). The column No. 1 serves as absorber/desorber. Hydrogen, inerts and C1 and C2 hydrocarbons are boiled up in the bottom part of the column and heavier hydrocarbons (C3, C4) are absorbed in the upper part of the column by heavy hydrocarbons (C6 and C7). The lean gas (2) leaving the head of the column is later burned in the furnace. The second column serves for separation of C3 and C4 hydrocarbons from the absorbent (6) which circulates among columns (1) and (2). The middle hydrocarbons (4) consisting mostly of propane and butanes are separated in the third column which produces commercial products propane (7) and butane (8).
Chapter 2 - Balancing in process industries
9
2t
7
2
v
3
I Fig. 2-2. Separation of light hydrocarbons
In this case we are interested in so-called multicomponent balance when individual components (inerts, individual hydrocarbons and hydrogen) are conserved. We can write one component balance equation for every component and the column (if the component is present in this column). The result of the balance is the complete information not only about overall flows but also about the composition of individual streams. Such multicomponent balance is important for tracing valuable components in the process. The value of commercial products (propane and butane) is much higher than the value of the lean gas. Significant economical losses can occur if the absorption in the first column does not operate properly and valuable hydrocarbons are lost in the lean gas. There are also other incentives for setting up such multicomponent balance. The balance in a multicomponent system can serve for validation of sampling and analytical methods. The analysis of imbalances (inputs minus outputs) can reveal errors caused by improper sampling or erroneous analytical methods. Nowadays, process simulators which can simulate the behaviour of the plant on the computer are more and more used for the optimisation and control of processes. The major problem in using simulators is their tuning to simulate properly all important features of the real process. This can be done only by comparison of the result of simulation with the complete component balance set up on the basis of plant data. input
output
reactor C12,CH4
Fig. 2-3. A chlorination reactor
CI_,,CH4,CH3C1,CH2C12, CHCls, CC14,HC1
10
Material and Energy Balancing in the Process Industries
There is a chlorination reactor in Fig. 2-3. Methane is chlorinated in a complex reaction set which can be summarised as CH 4
+ C12 CH3C1 + C12 CH2C12 + C12 CHC13 + C12
= CH3C1 + HC1 = CH2C12 + HC1 = CHC13 + HC1 = CC14 + HC1.
In this case the individual components are not conserved in the reactor as they can be consumed or created by reactions. The balance of the reactor is governed by the stoichiometry of the reaction system. In this case we speak about the multicomponent balance with chemical reaction. The result of balancing is the complete information about amount of individual components entering and leaving the reactor and also about reaction characteristics as reaction rates or extents of reaction. Balancing of reacting systems is important for detailed analysis of processes running in the reactor, either in the stage of laboratory or pilot plant studies, or as regular monitoring of industrial reactors behaviour (yields, selectivity). In the last case it is possible to reveal important changes as improper control, ageing of the catalyst, etc., which can cause serious economic losses or even jeopardise the safety of the whole process. Another flowsheet is in Fig. 2-4. The distillation column is complemented by two heat exchangers which makes possible preheating of the feed by the contact with hot bottom product. In practice, especially in refinery and petrochemical industries, we can meet even with much complicated heat exchange systems consisting of dozens of heat exchangers which make processes economically viable. ~9 distillate
feed
I
bottom product
Fig. 2-4. A feed of the column preheat
To analyse such system the heat or enthalpy balance must be set up, which includes the complete information about enthalpy of streams and also
Chapter 2
-
Balancing in process industries
11
about heat fluxes occurring among some parts of the system. We can meet with this kind of balancing either when designing a new process, or during monitoring or control of the existing process (evaluation of heat transfer coefficients, calculation of unmeasured temperatures, etc.). Such monitoring can reveal, for example a common quiet "thief' in process plants - a heat exchange area fouling. All these examples given above represent a broad class of needs we can meet in practice. The information about balanced quantities are obtained by solving the system of balance equations on the basis of measured or otherwise specified values of variables. There are two basic types of balance calculations. For the first case is typical that some variables (flows, inventories, etc.) are fixed and the other are calculated by direct solving the system of equations. The number of unknowns equals the number of independent equations and the selection of unknowns must guarantee the solvability of the system. This situation is typical for example for steady-state balancing in the stage of the design of the process. This type of balancing which can be reduced to equations solving was the main topic in earlier chemical engineering balancing literature. The solution is relatively easy (with the use of computers and balancing software which is now available). The one problem can be the selection of the set of independent variables which makes the problem just solvable. Such a system of independent variables can differ from the set we would like to specify independently. The other problem can be the consistent set of enthalpy data in the case of energy balancing. Nowadays process simulators are widely used for designing of new processes which are capable of setting up the complete material and energy balance of even very complicated processes. The other area of mass and energy balancing concerns the analysis of operating processes. The advent of process computers brought the huge amount of process data from operating plants, sometimes of dubious quality. At the same time the widely spread personal computers brought an immense computing power to process engineers. The situation here is much more complicated than in the case of balancing in the design area. The occurrence of measured variables in operating processes depends mostly on the instrumentation which is usually dictated by control engineers to guarantee good controllability of the process. Less attention is given to balancing needs, where very often only basic inputs and outputs are measured with sufficient precision (the custody measurement). On the other hand, in some areas where the control is critical there is more information for balancing than needed, we say that the instrumentation is redundant. So we can meet very often with insufficient instrumentation in one part of the plant and with huge amount of redundant data in the rest. All this influences the unique solvability of the system of balancing equations and makes the balancing more difficult. This situation which started in early sixties brought the need for systematic methods for the second type of balancing- the balancing based on
12
Material and Energy Balancing in the Process Industries
measured data. Besides problems with redundant or insufficient data also other problems have to be solved. Statistical methods were used for the adjustment of controversial data by reconciliation. Reconciliation which was developed about two hundred years ago was re-invented for balancing in early sixties. Since then many problems typical for the use of reconciliation in process engineering were successfully solved. Results of balancing based on measured data are significantly influenced by measurement errors. The propagation of measurement errors in the process of balancing provides the information about the reliability of results by confidence intervals. Very useful are techniques of the statistical analysis of process data aimed at detection and elimination of gross measurement and other gross errors. It is also possible to optimise the instrumentation to improve results of balancing. All this theory and techniques are now available to improve the quality of mass and energy balancing in process plants.
2.2
BALANCING
FLOWSHEET
- GRAPH
REPRESENTATION
In the plant documentation we can usually meet with process and instrumentation (P&I) diagrams which contain the process equipment and the instrumentation and control loops. P&I diagrams are usually too much detailed for balancing purposes. We can simplify them by deleting control loops and a part of instrumentation which is not needed for balancing purposes. Very often the flowsheet can be further simplified by ignoring of some parts of equipment or by merging some pieces into one equipment. For example, in the case of mass balance, pumps can be neglected because they have only one input and one output and their mass balance is a trivial one. Even in the case of enthalpy balance, pumps are often neglected as the shaft work exerted on the pump is often negligible in comparison with the enthalpy changes of streams. Similarly, if only the multicomponent balance is set up around a distillation column, the column proper is usually merged with the condenser, boiler, or other supporting equipment. The resulting flowsheet whose complexness is just sufficient for the purpose of the balance is finally redrawn in the graph form. The graph representation of the flowsheet for the single-component balance shown in Fig. 2-1 is in Fig. 2-5. The graph consists of nodes (circles) and streams (arrows). Every stream is incident either with two nodes or with one node and the environment (which can be viewed also as one of the nodes).
Chapter 2 - Balancing
13
in process industries
T
13
,
~
~
3
8
w--
Fig. 2-5. A graphrepresentationof balancingflowsheet
By comparing Figs. 2-1 and 2-5, we can see that the new stream (13) occurred in Fig. 2-5. This stream represents the artificial (fictitious) stream - the accumulation of mass in the tank (2). We will meet with artificial streams more in the next parts of the book. The direct application of conservation laws to the graph in Fig. 2-5 in the present form would lead to some problems. For example, there are different kinds of streams incident with the node (3) - mass streams, electric energy streams and the heating gas (12). As we try to set up the single-component balance (only one balancing equation around every node), we must separate streams according to the kind of the stream. The final graph representation of the balancing flowsheet is in Fig. 2-6. The original graph breaks into two parts which have the only node common - the environment (the environment node is not shown in the Fig. 2-6 explicitly). It is also worth mentioning the stream 12 which is used as the fuel in the node 3. This stream can't be taken into account in the mass balance of the node 3, so that the direction of this stream is from the node 4 to the environment.
14
Material and Energy Balancing in the Process Industries
13 2
3
4
~.
l l 212 7
5
/'@,
8 v
Fig. 2-6. A balancing graph after decomposition
Nodes in balancing flowsheets can be classified in several groups. The most common are nonreaction nodes. Typical representatives are distillation and absorption columns, heat exchangers or pipe junctions. Pipes are usually represented by arrows, but in some special situations pipes can be viewed as nodes. Examples here are balancing heat losses from the pipe or dynamic balancing flows of a compressible fluid in a distribution network. Special types of nonreaction nodes are so-called splitters with two or more outgoing streams of the same composition, temperature, etc. Some unit operations can be split in two or more fictitious nodes. For example, heat exchangers are usually balanced as tube and shell sides connected by a fictitious stream which represents the heat flux in the exchanger. Reactors are nodes where chemical transformation occurs. To maintain the conservation law, the fictitious streams representing sources or sinks of reacting components going to or from the environment can be defined. It is also possible to eliminate the fictitious streams by an algebraic procedure expounded in Chapter 4. Separate units (such as storage tanks) where the material is only stored (and the inventory can be measured) can be called inventory nodes. They are each connected by a fictitious stream (accumulation) with the environment.
Chapter 2 - Balancing in process industries 2.3
15
BALANCING VARIABLES AND DATA PRE-PROCESSING
Process variables which characterise process streams are of different nature (volume flows, temperatures, composition, pH, electric conductivity, etc.). It is important to transform the primary data to so-called balancing variables. The system of balancing variables must be consistent as concerns the physical dimensions of balancing variables. In general, the balance can be set up in extensive quantities, as mass, or in intensive quantities which are related to a unit of time. In the second case the extensive quantities are divided by the length of the time interval and so-called mean integralflowrates are created. In the limit (for short intervals), they can be regarded as 'instantaneous' and conversely, the former (extensive) as time-integrated. If also energy is being balanced, the streams can comprise 'net energy streams' such as in Fig. 2-1. The other streams represent material flow. The flow of energy in a material stream can be expressed as product of the (instantaneous or integrated) mass flowrate and energy per unit mass. The relevant part of the energy associated with the material is its enthalpy; thus the energy factor is specific enthalpy. In balancing several chemical components, the factor is component mass/total mass, hence the mass fraction of the component. In this book, we prefer the mass system of variables (mass, specific enthalpy, mass fractions). Nevertheless, also the molar system is worth mentioning. The molar system is widely used in chemistry and classical chemical thermodynamics. Based on the elementary idea that matter is composed of molecules, a conventional number of molecules is taken as a unit; traditionally (and later precised for scientific purposes), it is the number of molecules in 32 grammes of oxygen 02, which equals 0.602x1024 (Avogadro's number). This quantity of matter is called mole, or g-mole more precisely. Then 1 0 3 g-moles (1 kg-mole) is denoted as 1 kmol in the system of units consistent with 1 kg as unit of mass. Let generally a chemical species X be assigned chemical formula E a F b G c ... where E, F, G, ... are atoms (atom species) constituting the molecule, with atom masses (atomic weights) M E , MF, MG, "'" , respectively. Then the quantity Mx = aME + bMF + cM C + ... represents the number of kilogrammes in 1 kg-mole of species X (thus 32 kg for X = 02 ). Mx is called the mole mass (molecular weight) of species X or, having been derived from the chemical formula, its formula mass. Its physical unit is kg kmol -~. The molar quantities in chemical thermodynamics are related to unit mole. Thus i f / ) x is specific enthalpy of species X (that of unit mass of the species) then the molar enthalpy equals
Material and Energy Balancing in the Process Industries
16 m
Hx - Mxtlx ; m
if/Qx is evaluated in J kg -1 and M x in kg kmol -~ then Hx is in J kmol -~. [Attention: Classical thermodynamical tables use frequently 1 g-mole as unit; then the numerical values have to be multiplied by l0 3 to have the quantity per 1 kmol.] In a mixture of several components (A, B, C, ... ), we can introduce the m e a n mole mass M-
x A M A + x B M B + x c M c + "'"
where XA is mole fraction of_component A etc. If/4 is specific enthalpy of the mixture, its molar enthalpy H equals H
-
MH
.
In Table 2-1 are summarised the balancing variables for the two systems, making each of them consistent. The generic symbols made use of in this book will later be written with indices such as mj for mass flowrate in j-th stream or y~, for k-th component mass fraction in j-th stream. In the last column, in addition to heat or (mechanical) work also electric energy can be considered. Tab. 2-1. Consistent systems of balancing variables Mass system Generic symbol
a
m
!
Quantity Unit
mass fraction
mass kg
specific enthalpy J kg -I
heat, work
specific enthalpy J kg -I
heat flow rate, power W
J !
Quantity Unit
mass flowrate kg s ~
mass fraction Molar system
O
Generic symbol Quantity unit Quantity Unit
number of moles
mole fraction
kmol s-t
heat, work
J kmol -~
kmol mole flowrate
molar enthalpy
mole fraction
molar enthalpy J kmol ~
heat flow rate, power W
i !
Chapter
2 -
17
Balancing in process industries
In the case of energy balancing the requirement of consistency means not only the system of units, but also the consistent system of zero-levels for enthalpy, especially for reacting systems. All these problems will be dealt with in next chapters of this book. The transformation of primary variables to balancing variables is a part of data pre-processing which precedes the balancing proper. Data pre-processing begins with calculating basic statistics, as integration of flows or averaging of other process variables in the selected time interval. After that balancing variables are calculated from pre-processed data. This step can range from basic mathematical operations as multiplication of the volume and density to obtain the mass, to calculation of specific enthalpy of streams which can be based on very complex thermodynamic correlations. A special sort of data pre-processing are so-called compensations of instrument readings. Typical example here can be the compensation of orifice for the temperature and pressure which depart from values supposed when designing the instrumentation. In practice we can often meet with the situation when underlying data belong to different systems of units which can be even inconsistent. The information about composition can be in grammes per litre, the composition of gases can be based on the dry gas, etc. The original data must be further recalculated to the specific consistent set. Consistent composition variables are mass fractions in the mass system and mole fractions in the molar system. Quite common are, however, also the component densities expressed per unit volume of the mixture. The relations among the composition variables are summarised in Table 2-2 below. Let us first summarise the definitions and notation. Ck "'" k-th component of the mixture, of mole mass Mk m ... total mass of the mixture, m k ... mass of n ... total number of moles, r/k
.-"
C k
in the mixture
number of moles of Ck
V ... volume of the mixture (m 3 ), P "'" its (mass) density (kg m -3 )
9V=m. Then mass fraction of
Ck:Y
k --
mk , m
where Y~kYk - k~ Xk - - 1 The densities are
mole fraction
of Ck'X
k -
nk r/
18
Material and Energy Balancing in the Process Industries
partial mass density of Ck "Ok =
mk
(kg m -3)
V nk
partial mole density of Ck :Ck -- -7_ (kmol m-3). v We then have the table Table 2-2. The most common systems of composition variables function of Yk Yk
Yk =
Xk
M kx k
Pk
X m. x.
p
h
Yk
Xk
Xk =
MkE Yh M~ l h [3 Yk
Pk "-
Pk
Pk MkE PhMh i h
gk Xk ~ p X Mhxh
Pk
Mk Ck
Ck ]~ C h
h
M~ck
h
Ck =
P Yk
P Xk
m~
x m~ x~
Pk Ck
h
Observe that B
X; Mh Xh = M (mean mole mass) h
and ]~ Ch --
h
p -- =
M
n
V
is mole density (kmol m -3) of the mixture. Still other composition variables can occur. For example if the mixture can be regarded as solution of components C2, C3, "-" in solvent C~, the concentrations of the former can be expressed as mass (moles) of Ck (k > 2) per unit mass (mole) of C~, say Zk. Thus for instance in the mass system k>2:
Yk
Zk = ~ Yl
(Zl= 1)
Chapter 2
-
Balancing in process industries
19
and conversely -1 Yk = Zk
1 + Z Zh h>2
the same in the molar system with x instead of y.
2.4
DATA R E C O N C I L I A T I O N
If some measured variables are redundant, the solution of the balancing problem is based on reconciliation. In this case the measured values must be complemented by the information about their precision, which characterises random measurement errors, or the accuracy, which takes into account also the systematic part of overall error. Measurement error is defined as the difference between measured and true (usually unknown) value. The errors can be classified as random, systematic gross. Random errors are unpredictable errors whose values oscillate around zero. Their existence in the measuring process is inevitable. Random errors are governed by probabilistic laws and are fully described by the probability density function. The most important is so-called normal (Gauss) distribution which is fully characterised by the standard deviation (the mean value equals zero for random errors). The square of standard deviation is the variance of the measurement. The standard deviation c can be estimated from repeated measurement of one value: s=
F /Z (xi- m)2 N
n-1
(1)
where s is the estimate of the standard deviation; xi are measured values; m is the arithmetic average of measured values and n is the number of measured values. Systematic errors have deterministic character. There are e.g. systematic errors in time, varying in some systematic manner (linear drift of zero of measurement instruments, etc.). Systematic errors can be often eliminated by the calibration of instruments, by the use of standards, etc. Gross errors (outliers) are large errors occurring from time to time as a result of inattention, measurement devices failures, unsteady state, etc. In data
20
Material and Energy Balancing in the Process Industries
measured in process plants, gross errors are important as a single gross error can invalidate all the results, disable process control systems and the like. As gross errors may be quite frequent in plant measurements, their detection and elimination is very important. In some situations we have the information about maximum measurement errors. Such maximum errors are provided by vendors of measuring instruments (sometimes as the class of accuracy). As the information about measurement accuracy must be provided in a consistent manner, the basic question concerns the relation between the standard deviation and the maximum error of measured value. The rigorous answer to this question probably does not exist. In practice we can recommend to take the standard deviation as one half of the maximum error. For more discussions about this controversial topic see (Madron, 1992). After preparing values of measured or otherwise fixed balancing variables which are available before balancing proper, there remains to specify the set of first guesses of unmeasured variables which are supposed to be the result of balancing. In the case of single-component (linear) balancing the situation is simple. The solution in this case (if exists) is unique and is obtained in the single calculation step regardless of the first guesses of unmeasured variables. If the balancing model is non-linear (all balancing except the singlecomponent one), the first guesses of unmeasured variables are required. There are several reasons to provide the best estimates of unmeasured variables available. The solution of a non-linear balance is based on an iterative solution of the system of equations. If the starting data set is far from the final solution, the number of iterations can be high or the iteration process may diverge. It is also known that there exist multiple solutions of which only one is reasonable. The situation is even more complicated in redundant systems with some unobservable variables; such situations will be discussed more throughout the book. To summarise, it is worthwhile to spend some effort in providing good estimates of unmeasured variables in non-linear balancing.
2.5
C L A S S I F I C A T I O N OF VARIABLES
This section deals with classification of variables which has close relation to solvability of the balancing problem. Let's start with some simple examples of single-component balance shown in Fig. 2-7.
21
C h a p t e r 2 - Balancing in process industries
s
ti
,"
2
a}
b) tI ff 2
.3 ....
"-, 93 ~'.,~7
c)
d)
Fig. 2-7. Balancing graphs - classification of variables measured flow; .......... unmeasured flow
Graph 2-7a represents one balancing equation around one node. There is also one unknown flow which can be calculated from the equation. The system is just solvable and the unmeasured flow is observable. The two measured flows are nonredundant. In graph 2-7b all three streams are measured. The system is redundant as one of the streams need not be measured and could be calculated. All three streams are redundant but the degree of redundancy is only one (as only one measurement is more than needed to make the system uniquely solvable). The flows in a system with all streams measured will not probably be consistent with the balancing model (the sum of inputs will not equal the sum of outputs). This problem is solved by reconciliation which means adjustment of flows to meet the overall balance. In graph 2-7c there are two unmeasured streams. The problem (one equation and two unknowns) is still solvable, but the solution is not unique. We say that the two unmeasured flows are not observable (they are unobservable). The only solution of this obstacle is to complete the measurement (at least one more stream must be measured to make the system fully observable). In practice we can meet with even more complicated situations - see Fig. 2-7d. Streams 1, 2, 4 and 5 are measured and redundant (one stream can be calculated from the others). Stream 6 is measured, but nonredundant. Streams 3 and 7 are unmeasured and observable. Streams 8 and 9 are unmeasured and unobservable. The general classification of balancing variables is presented in Fig. 2-8. Anyway, we can see that even in a relatively simple flowsheet with the
22
Material and Energy Balancing in the Process Industries
most simple balancing model (single-component balance) the situation starts to be a little bit difficult to interpret. variable
I
J
measured
1
( unmeasured )
(c~
(fixed)l
just determined1 ( redundant I [ observable I (unobservable I Fig. 2-8. Classification of variables The problem of solvability of balancing systems is usually solved in chemical engineering literature by the concept of degrees of freedom. Every balancing node (or unit operation) has its own number of degrees of freedom which is the difference between the number of variables and the number of equations among them. Full solvability of such a node is achieved by specification of some variables. The number of degrees of freedom of the whole system is the sum of degrees of freedom of individual nodes corrected for variables common to neighbouring nodes. This approach is useful in education of chemical engineers and may play some role in balancing in the stage of the design of new processes. For general case with possible redundancy this approach is difficult to apply. Throughout the present book the analysis of solvability and classification of variables is based on more general approach - the detailed analysis of the system of balancing equations or on the analysis of graphs in the case of single-component balance.
2.6
DATA C O L L E C T I O N AND PROCESSING
If someone meets with the need of setting up the balance of some process based on one set of data, the problem of data collection seems to be relatively simple and straightforward. The major problem usually is obtaining thermodynamic properties of streams in the case of energy balance. A different situation can be met in balancing used in daily operation of process plants. Typical applications here are
Chapter 2- Balancing in process industries
23
daily mass and utilities balancing for accounting purposes monitoring of heat recovery systems monitoring of operation of chemical reactors regular balancing of separation systems balancing as a part of control of processes. If the balancing is done on regular basis, the data collection and processing must be well organised. The experience in this area shows that the data collection can be hardly based only on manual inputs. The systematic use of process control systems and process databases provides the way of efficient solving of this problems. The modem process information system is shown in Fig. 2-9. The basis of the whole system is the core database of process variables. Typical variables which are stored in such database are flows, inventories, temperatures, laboratory data, etc. The other data needed for balancing are in a databank of physical properties needed for setting up energy balances. The system is based on a Local Area Network (LAN) which makes possible the use of the database by other software and plant staff (clients of the information system). The data input to the core database can be from Distributed Control Systems (DCS), laboratory systems or other process databases. In practice also the manual entries must be available as DCS are usually not available in all plants of the company. DATA INPUT
(communication with ~ DCS systems
//
,,/ [HISTORYJ ,"
importfrom I ( external databases
/Laboratory Labc ]
N,.
~
manual input
e core of a pro (Database of process] I~ variables )
.
/
(
( data ] ~
)
(Physicalproperty~
~
datal~ard~ " J . ~
~
QEmissionsreporting)
APPLICATIONS
Fig. 2-9. Balancing as a part of a plant information system
)
~
x,,,N
~/ r _" , [PLANNINGJ
I REPORTING)
24
Material and Energy Balancing in the Process Industries
Above the core database work so-called applications where belong also balancing systems. They usually import data from the core database, make data pre-processing and the balancing calculations proper. After that, balancing results are checked by the administrator of the balancing system for correctness and the results are stored in a special database. Balancing data are from this moment available via the LAN to all plant personnel and also to other information systems. The raw balancing data are usually presented to users in well shaped form of reports highlighting the most important results of the balance. Such an information system must be integrated, which means that the individual users of the database (applications) know where the relevant data are and are able to use them.
2.7
RECOMMENDED LITERATURE
Madron, F.(1992) Process Plant Performance. Measurement and data processing for optimization and retrofits. E. Horwood, New York Mah, R.S.H. (1990) Chemical Process Structures and Information Flows. Butterworths, Boston Reklaitis, G.V. and D.R. Schneider (1983) Introduction to Material and Energy Balances. John Wiley, New York
25
Chapter 3 MASS (SINGLE-COMPONENT)
BALANCE
Single-component balancing means setting-up the balance of one quantity obeying a conservation law; one balance is set up around each node. In chemical technology, it is the total mass (possibly the sum of masses of individual components of a mixture) that remains conserved in any process. Another example is the conservation of electric charge expressed as First Kirchhoff' s Law for (direct-current) electrical networks. It is also possible to consider thebalance of one selected chemical element (irrespective of in what chemical component it occurs), or also of a component not participating in any chemical reaction. This chapter deals with mass balancing. The reader is recommended to peruse Sections A. 1-A.4 of Appendix A. For the necessary notions of linear algebra, see Sections B. 1-B.8 of Appendix B.
3.1
STEADY-STATE MASS BALANCE AND ITS GRAPH REPRESENTATION Generally, the mass balance of a unit (node) reads
Z mj in.Z mj - out
an
(3.1.1)
an .I
h.
node n "k
Fig. 3-1a. Node balance
"~} (mj)~ Jr"
26
Material and Energy Balancing in the Process Industries
where mj is (possibly integral or integral mean) mass flowrate of j-th stream, 'in' means input, 'out' means output streams j; an is increase (per unit time or per period) of accumulation in the (say, n-th) node. A 'steady-state' balance means formally a n = 0. With the above interpretation of an, the change in accumulation (holdup) is then neglected. It is also possible to regard a n as a fictitious rate of mass flow directed outwards; then a n becomes one of the output flowrates mj and the RHS in Eq.(3.1.1) becomes zero.
an (mj)i" {
(mj)out
node n
Fig. 3-lb. Accumulation stream regarded as output stream
The fictitious flowrate a n can be positive or negative. In a system of units n ~ N u (set of units) connected by streams j ~ J (set of streams), the (formally steady-state) balances can be written in the form Z Cnjmj = 0
j~J
(n ~
N u)
(3.1.2)
where Cnj = 1 if stream j is input into node n Cnj = -1 if stream j is output from node n
(3.1.3)
Cnj = 0 if stream j is neither input nor output. The notation ~ means sum of terms j over set J, independent of the order in the summatioJ~.JThis kind of notation will be used henceforth for convenience, as in further analysis the sets will be re-arranged in different manners. Also the number of elements of a (general finite) set M is independent of the order and will further be denoted by [ M I . Recall now Appendix A. Clearly, whatever be the index orders the matrix C of elements Cnj is the reduced incidence matrix of an oriented graph (say) G. The set of arcs of G is J and any arc j ~ J is incident to one node n ~ N u at least (Cnj ~ 0), to two,such nodes at most. Let us now introduce the node n o in the
27
Chapter 3 - Mass (Single-component) Balance
following manner: the other endpoint of any arc j ~ J that has only one endpoint in the set N u of units, is no. Thus for example the balancing scheme
I
Fig. 3-2a. Balancing scheme
is completed to a graph
.
-
.
no en
l
-'x..
-•set
Nu of units
Fig. 3-2b. Graph of the balancing scheme
Clearly, the streams incident to node n o , according to the direction, either represent a material supplied to the system, or produced by the system as a whole; hence node n o is called the node environment. But observe that formally, also the fictitious streams such as in Fig. 3-1b (a n) are arcs incident to node n o . We thus have identified the graph G[N, J] whose node set is N = N u u {no} ; {no} m e a n s s e t of one element n 0.
(3.1.4)
28
Material and Energy Balancing in the Process Industries
A natural requirement is that G is connected: any node (unit) n attainable by a path, thus also by a sequence of (arbitrarily oriented) arcs at node no; otherwise certain subsystem of units would have no input output, which is technologically absurd. The immediate consequence system of equations (3.1.2) is, by (A.7 and 8) rankC = I Nu I
~ N u is starting and no for the
(3.1.5)
where IN u [ is the number of elements of set Nu; hence the matrix C is of full row rank. If we introduce some orders of elements n s N u and of elements j ~ J, the system (3.1.2) reads Cm = 0 ;
(3.1.6)
here, m is column vector of components mj (j e J), an element of t J l -dimensional space (say) q/'. The set of solutions is the null space KerC of matrix C, a vector subspace of q/', of dimension I J I-INn I. Clearly, the system as a whole has at least one input and one output, and the graph G contains a circuit, hence IJI > INul ;
(3.1.7)
see (A.3), with [Ni - I Nu I + 1. Consequently (and of course), there are always nonnull solutions to Eq.(3.1.6). A correctly written technological scheme (graph) has to satisfy certain other natural requirements. The equation (3.1.6) has, by (3.1.7), always a nonnull solution (m~:0), but it can still happen that certain mi is uniquely determined as mj = 0; such stream is then, in effect, absent. Let us consider first an arc (stream) jl ~ J that lies on a circuit of the graph G; for example
29
Chapter 3 - Mass (Single-component) Balance
Fig. 3-3. A circuit
(recall that the notion of a circuit is independent of orientation). It is then easily shown that if vector m (of j-th component mj) is a solution then if a is arbitrary, there exists always a solution m such that mj, = r~j, + a. The idea of the proof consists in adding a fictitious circulation a along the circuit as indicated in Fig. 3-3; in any of the node balances, the circulation term cancels and all the balance equations are again obeyed. Conversely let arc J2 separate the graph, thus J2 lies on no circuit according to the terminology of Appendix A; then if m is an arbitrary solution, we have uniquely mJ,_= o. The conclusion follows formally from (A.9)-(A.13), where Arcd stands for C (3.1.6). We can also imagine Fig. A-7 as an example. More generally, the graph G is decomposed m
./'2
Fig. 3-4. Arc J2 separates the graph The node n o (environment) belongs to, say, subgraph G1, while G2 is connected by just one stream with G i" when balancing G2 as a whole, the input/output results mi_, = o. Technologically, such case is absurd; the units of G2 would be constantly out of operation. For a correctly written technological scheme, such cases are precluded.
30
Material and Energy Balancing in the Process Industries
In what follows, we shall always suppose that the equation (3.1.6) has some solution in such that mj ~ 0 whatever be j ~ J (and even mj > 0 if j is not a fictitious accumulation stream).
Remark In mass- and energy balancing problems can occur the case when two or more separate plants (systems of units) cooperate via certain streams of energy from one plant into another.
energy stream Fig. 3-5. Cooperating plants
Thus in Fig. 3-5, the input/output streams into/from separate plants G~ and G 2 are incident to environment node no; in addition the plants G~ and G 2 are connected via certain energy stream(s), and some energy stream(s) can connect directly G 2 with n 0. We can obtain connected graph G whose node set consists of Nu~ (units of G1), Nu2 (units of G2), and n 0. The arc set J of G consists of: arcs between the units of G~ , arcs between the units of G 2, and the arcs connecting G~ and G 2 with environment node as drawn. In the set of mass- and energy balance equations as considered later in Chapter 5, we can take the whole G[N,J] as the graph of material streams. On the other hand, the mass balances of G1 and G2 are independent. Indeed, with reduced incident matrices C 1 and C2, respectively, we have the balances (3.1.2) thus (3.1.6) C~m~ = 0
and
Czm 2 = 0
(3.1.8)
w h e r e m I and m 2 are the respective vectors of mass flowrates. This corresponds
to a partition of the (full) incidence matrix of G
Chapter 3- Mass (Single-component) Balance no
~1 ~2
Nul
C1
Nu2
31
(3.1.9) C2
Here, the row vectors c~ resp. o~2 have nonnull elements (_+1 according to the orientation) in the columns i~, j~, k~ resp. i2, J2 according to Fig. 3-5. The void fields are zeros, because no arc incident to some node n ~ Nu~ is incident to any m ~ Nu2 . AS a consequence, we can analyze the two mass balances (3.1.8) separately. The corresponding full incidence matrices are
C1
N,2
/~176 C2
(3.~.1o)
Nu2
The reader can certainly imagine the case where there are more than two cooperating plants interconnected by energy streams only, with arbitrary numbers of streams connecting the plants with the environment. We obtain again a partition such as in (3.1.9), with several matrices C~, C 2 , .-. and row vectors ~ , 0~ 2 , "'" . Each of the matrices (3.1.10) is that of a connected graph (node no is formally split into two or more environment nodes). If we delete node n o and the incident arcs i 1, j~, k~, i 2 , J2 in Fig. 3-5, the graph G becomes disconnected into two separate parts G~ and G2. In graph theory, a node n o having such property is called cutnode of G. Conversely let us have a graph G, with reference (environment) node n 0. We perhaps don't know that the mass balances can be separated. The possibility is easily verified. We delete node no and all the arcs incident to n o. If the graph is disconnected then n o is a cutnode and the partition of the remaining set of nodes determines the cooperating plants; generally, they can be more than two.
3.2
MORE ON SOLVABILITY
3.2.1
Partition of variables and equations
In the set J of arcs j thus of variables mj, let us assume that certain variables have been fixed as (say) mj, +" let J+ be the corresponding set of arcs, j0 _ j _ j+ the remaining subset. Generally, the values m.+ j can be certain measured values, or also certain target values required when designing the plant or otherwise. Making abstraction from the way how the m~ have been determined, we see immediately that the set of equations (3.1.2)
32
Material and Energy Balancing in the Process Industries (n ~ Nu)
jeZ joCn.m. J J + j~Z j+C.m nj + j .-0
(3.2.1)
in variables mj (j e j0) can have generally an infinity of solutions, or also no solution; in a special case, it has just one solution, i.e. a unique subvector of components mj (j e j0) obeying (3.2.1) whatever be the fixed m~. In the first case, the system is undetermined, in the second overdetermined. The special third case where the system is just determined will be examined in more detail in Section 3.5. In the second case, there are certain conditions the variables m~ have to obey so as to make the system (generally not uniquely) solvable. If so, certain variables mi (J e j0) are uniquely determined by the equations, certain other still not in general. Let us analyze the solvability in more detail. When restricting the graph G to arcs j e j0, we obtain a subgraph (say) G~ its reduced incidence matrix is of elements Cnj where n e Nu and j e jo. The subgraph is generally not connected; it can even contain isolated nodes, not incident with any arc j e j0. Example:
Jl
-~ G,
no ~
li .
.
j
i
E: .
a
-:
! ,,,," k
.
J2
b
Fig. 3-6. Fixed and unknown streams j e J+ (fixed) j ~ jo (unknown)
0
G3 O
~t |
1i
G~
! !
O 0 G1
1 | 1i
.,o
1!
O 0 G2
|
1 1!
0
G4 Fig. 3-6a. Graph of unknown streams in G
<)
,, ~o
]
,s"
~,-'""k
Go 5
Chapter
3-
33
Mass (Single-component) Balance
Let G o (k - 1, ..., K) be generally the connected components of G o ( K - l means that G o is connected), with node sets Nk and arc sets jo; in Fig. 3-6a, K - 5, three components are isolated nodes, and for example in G ~ N 5 - {a, b, c} and jo 5 - {i, k}. With a corresponding rearrangement of rows and columns, let C o be the f u l l incidence matrix of G o , C~ a block of the f u l l incidence matrix of G, restricted to nodes (rows) n ~ Nk and arcs ( c o l u m n s ) j ~ J+. Thus for k - 5 in Figs. 3-6 and 3-6a i
k
-1 CO 5 -
a
1 -1
b
1
c
and .....
j,
j2j'
1 C +5 -
l .....
-1
a
b
1 1
c
-1
where the void fields are zeros. Indeed, with the subset N s - {a, b, c } of nodes are incident the unknown streams (arcs) i, k (~ jo) and the fixed streams Jl, J2, j ' , l (~ J+), the other are nonincident. (For convenience, we have ranged the latter streams as written after one another.) The streams Jl, J2, l have the other endpoints in other subsets N k. Observe that the two matrices correspond to the balances of nodes a, b,c mi
- m + j,
+ m .+ Jl
m i - m k
-0 =0
+ m + J2 + m j+, -
mk
m l+ m O
which can be written in the form
c o (mi
+ C~m+-O
mk
where m + is the vector of all the fixed m~.
34
Material and Energy Balancing in the Process Industries
Generally, let us partition the vector of unknown streams into subvectors m k (k - 1, -.-, K). Here, m k is the vector of components mj where j ~ j0; thus in the above example, m 5 = (mi, mOT. Observe that some j0 can be empty; then m k is absent. Let further in + be the vector of fixed components m~ where j e J+. Recall also thatthe balance (3.1.6) thus Cm - 0 is equivalent to the equat_ion Cm = 0 where C is the full incidence matrix of G; indeed, the row n o of C is linear combination of the rows of C. Thus the system (3.2.1) is, with the above partition, equivalent to k - 1, ..- , K:
C ~ m k + C~ m + - 0
(3.2.2)
because nodes n ~ Nk can be incident only with arcs j ~ j0 and some j ~ J+. By the connectedness of each G ~ just one (arbitrary) row of C o is linearly dependent, equal to minus sum of the remaining ones; recall that C o is the full incidence matrix of G ~ If G o is an isolated node then j0 = Q and we put, by convention, C o rnk = 0 thus the equation reads C~ m + - 0.
3.2.2
Transformations
Let us apply the operation 'merging of nodes' to each subset N k of nodes of our graph G. Let G* be the reduced graph obtained in this manner. Thus with Fig. 3-6 we have
Jl
G1 Fig. 3-7 Reduced graph
where for example node ~ represents the three merged nodes a, b, c of G~ observe that arc j ' has been deleted by the merging. The graph G* is connected (as G is), hence its full incidence matrix (of K rows) is of rank K-1. On selecting an arbitrary reference node in G*, let A* be the reduced incidence matrix. The merging of nodes corresponds to the summation of rows in the original full incidence matrix. In particular the arcs j e j0 (k - 1, ..., K) are deleted. But it can
Chapter
3 - Mass (Single-component) Balance
35
happen that in addition certain arcs j ~ J+ are also deleted; for example the arc j ' in Fig. 3-6. Let thus J* ( c J§ be the arc set of G*; then matrix A* operates on columns j ~ J* and let m * be the subvector of m § of components mj , j ~ J* . We thus have A* m* - 0
where
rankA* - K - 1
(3.2.3)
is full row rank; of course if K = 1 then the equation is absent. Consider again the example in Fig. 3-6. According to Fig. 3-6a, for instance the subgraph G O of G O is an isolated node. The balance of the node involves only arcs j e J+ (fixed) and remains unaffected by the merging; it becomes one of the scalar equations (3.2.3). The unknown variables mj (j ~ jo) occur only in the balances of 'nontrivial' subgraphs G Osuch as G Ocontaining the nodes a, b, c; see above. The merging represents summation of the node balances giving m +. J, + m.+ J2 - ml+ - 0 which is the node ~ -balance according to Fig. 3-7; it is also one of the scalar equations (3.2.3), where stream j ' is absent (deleted by the merging). Having replaced the node c -balance by that of node ~ (obtained by the summation), the remaining balances (of nodes a and b) read mi mi- mk
+
m .+ J1
-
+
m .+ J2
m j+ ,
- 0 = 0
which can be written in the form
B5 ( mi mk
+ c5 = 0
where c 5 - A 5m + ;
here, A 5 is the submatrix of C; where the third (c) row has been deleted. Taking c as reference node in G ~ B 5 is the reduced incidence matrix of G ~ Clearly, the original three balances are equivalent to the three new ones; in addition if the first (node g:) balance is satisfied then the remaining two equations are (in the present case even uniquely) solvable in m i and mk. Let us generalize. Let us arrange the subgraphs G Oin the manner that G ~ ---, G ~ (K' < K) are those subgraphs which are not isolated nodes; observe that if G Ois an isolated node, the corresponding (scalar) equation (node balance) in (3.2.2) becomes automatically one of the node balances of the reduced graph G*. Having selected a reference node in each G O for k - 1,-.-, K', let Bk be the reduced incidence matrix of G ~ thus B k is of full row rank; let further A k be the corresponding
36
Material and Energy Balancing in the Process Industries
submatrix of C~, with the reference-node balance deleted. Then the system (3.2.2) is equivalent to k-1, and
..., K'"
Bkmk,+mCk-- 0 - 0
where c k - A k m+ } (equation absent if K = 1)
(3.2.4)
which is a system generated by elementary operations (summations of rows). The subsystem (3.2.4)~ is (generally not uniquely) solvable in variables m k whatever be the e k. Hence the whole system (3.2.4), thus (3.2.1) admits some solution if and only if either K = 1 (G o connected), or the subvector m* obeys Eq.(3.2.4) 2. We also see that the natural requirement is
K-1
< I J*l
if K > 1 ;
'
(3.2.5)
otherwise, by (3.2.4) 2, the only solution in m* would be m* - 0, a case precluded by our convention (see the last paragraph of section 3.1 before Remark). Observe finally that with J' - J+- J*
(3.2.6)
(the set of arcs j e J+ deleted by the graph reduction), the values m.+ for j e J' J are not subject to any condition; they are arbitrary. Let now 1 < k < K' and let m ~ be some solution of the k-th vector e q u a t i o n ( 3 . 2 . 4 ) 1 . If m k is an arbitrary solution, we must have Bk(m k - m ~ = 0 .
(3.2.7)
Now G~ is connected hence denoting y - m k - m ~ the equation in y has the same properties as Eq.(3.1.6). Making use of the same arguments as in the paragraphs below the latter equation (with Figs. 3.3 and 3.4), we conclude" If j e Jk~ then the j-th component yj of y - m k - m 0k is uniquely determined as yj - 0 if and only if arc j sepa.rates the subgraph G ~ This is also a necessary and sufficient condition for the uniqueness of mj in the solution m k. Given the connected graph G and the partition of the arc set J into j0 and J+, also the subgraph G o and its components G o are uniquely determined, as well as the reduced graph G*, hence the subsets J* and J' of J+. By each G ~ also the arcs separating the subgraph are uniquely determined. So the variables (arcs j) can be classified: for j e J+ into j e J* and j e J ' , and for j e j0, thus j e Jk0 for some k - 1,--., K' into those which separate G o and those which lie in some circuit of G o, hence also in some circuit of the whole G~ conversely if an arc lies in some circuit of G ~ it must lie in some circuit of a connected component G ~
Chapter 3
-
Mass (Single-component) Balance
3.3
OBSERVABILITY AND R E D U N D A N C Y
3.3.1
Definitions and criteria
37
In Section 3.2, we have classified the variables by the criteria of solvability. The classification is purely algebraic, but the names given in practice to the respective properties are those introduced in the theory of measurement and control: observability and redundancy. The notions were introduced in a more general context; restricting oneself to steady-state models one considers a system of algebraic equations (constraints) and one assumes that certain variables have been measured. Then an unmeasured variable is called observable when its value is uniquely determined by the measured values and the constraints. A measured variable is called redundant when deleting its measurement, it remains uniquely determined by the other measured variables (and the constraints). As a consequence the measured redundant values, if erroneous, have first to be adjusted so as to obey the constraints; only then the observable unmeasured variables can be computed. Despite of the apparent clarity, this verbal formulation is rather vague in general; see later comments in Chapters 5 and 8. In the present case of mass balance equations, a rigorous mathematical definition is possible. Irrespective of how the values m~ have been fixed, we call the j-th variable m e a s u r e d if j ~ J+, unmeasured if j ~ j0 in (3.2.1). Then an unmeasuredj-th variable is called observable if, whenever there exists a solution to the system (3.2.1), the j-th component mj is uniquely determined by the measured values; thus if m~ is the j-th component of any other solution, we have mi = m]. A measured j-th variable is called r e d u n d a n t if, whatever be the measured vector m § such that the system (3.2.1.) has a solution, the remaining components (say) m~+ where i ~ j determine uniquely mi, +" thus if rh + is another measured vector such that the system is solvable and if mi - + - mi+ f o r a l l i ~ j , we have also rh+ j - m j+ . Using the result following after Eq.(3.2.7) we see immediatly that:
k -
1,
The j-th unmeasured variable where j ~ j0, thus j ~ Jk~ for some 9.., K' is observable if and only if arc j separates subgraph Gk~
or also
The j-th unmeasured variable is observablei f and only if arc j does not lie in any circuit of subgraph G ~ Recall that G O is the subgraph of G restricted to unmeasured streams (arcs), G o its k-th connected component, K' the number of components that are
38
Material and Energy Balancing in the Process Industries
not isolated nodes. The necessary and sufficient conditions give also a precise meaning to unobservability. An unmeasured variable that is not observable is called unobservable. Clearly, we thus have also the following special result.
The whole vector of unmeasured variables is observable if and only if all the connected components Gk~ of subgraph G o are trees (or also isolated nodes). Let us now recall the partition (3.2.6). For the j-th measured variable we have either j ~ J* or j ~ J'. If j ~ J* then mj is a component of vector m* in (3.2.4) 2. So if the necessary and sufficient condition (3.2.4) 2 of solvability is obeyed, at least one row of the vector equation contains variable mj = mj§ (with nonnull coefficient) and the corresponding scalar equation determines uniquely this mi, given the other m]~ (i ~: j). If j ~ J' then mj = m +..~is absent in (3.2.4) 2, hence arbitrary. Consequently, we have the result
The j-th measured variable (j ~ J+) is redundant if and only if j ~ J*, thus if and only if arc j is an arc of the reduced graph G*. A variable that is not redundant is called nonredundant. Thus
The j-th measured variable is nonredundant if and only if arc j is deleted by the graph reduction (merging the nodes connected by unmeasured streams). Clearly, if the arc j closes a circuit with certain unmeasured streams then its both endpoints are merged by the graph reduction, being connected by a sequence of arcs i ~ jo whose endpoints thus lie in one connected component G ~ Conversely if the endpoints of arc j lie in the same G O then there exists a path in G O between the endpoints, hence arc j closes a circuit with some arcs i ~ j0. We thus have the criterion
The j-th measured variable is nonredundant if and only if arc j closes a circuit with certain unmeasured streams (i.e. its endpoints are connected by a sequence of arcs i ~ j0). As an example, recall Fig. 3-6 where the j'-th variable is nonredundant. As drawn, all the unmeasured variables are observable. Note that if we deleted the j'-th measurement, the three unmeasured streams j', i, k forming a circuit would become unobservable. It is thus seen that the observability and redundancy are, in the case of mass balance equations, exact structural properties of the graph G of the system, and of the partition of the streams (arcs) into j0 and J+ corresponding to variables called respectively, by convention, 'unmeasured' and 'measured'. Let us add an observation concerning the redundancy. We call 'redundant' each variable (arc) of J* separately; this does not necessarily imply that also a subset of J* can be regarded as 'redundant' in the sense that the variables mj of the subset would be
Chapter 3
-
Mass (Single-component) Balance
39
uniquely determined by the remaining ones. From (3.2.4)2 it only follows that there exists a subset of (K-1) arcs (linearly independent columns of A*) such that the variables of the subset are uniquely determined by the other ones, and this number is maximum. The number K-1 (full row rank of matrix A*) is called the degree of redundancy. Not any K-1 columns of matrix A* are, however, linearly independent; consider for instance the reduced graph according to Fig. 3-7 where the columns corresponding to the parallel streams j~ and J2 are linearly dependent.
3.3.2
Classification methods and transformation of equations
The formal definitions enable us to classify the variables by graph algorithms. Basically, the classification algorithms consist in eliminating circuits containing unmeasured streams; see for instance Mah (1990), 8-2-2 and 9-1-1. As an example, let us outline a procedure that performs the classification simultaneously with transforming the equations in a manner suitable for adjustment (reconciliation) of measured variables, and computation of the unmeasured observable ones. Given is the connected graph G[N, J] of the system and the partition of the streams (arcs)j ~ J into unmeasured (j0) and measured (J+). Define subgraph G o [N, j0]. Then (a)
Decompose subgraph G o into connected components G o [Nk, Jk~ k = 1, ---, K. If K = 1 then the set of redundant variables is empty. If K > 1 then merge the nodes of each subset N k of nodes in the whole graph G. Get graph G* whose arc set is J* c J+; the arcs j ~ J* determine the set of redundant variables, those of J' = J+- J* the set if nonredundant ones.
(b)
In each subgraph G o that is not an isolated node (thus j0 :r O), find the subset Sk ( c j0) of arcs that separate G ~ Then the union S of the subsets Sk determines the set of unmeasured observable variables.
Let us notice that according to Section A.3 of Appendix A, an arc that separates a connected graph (whose deletion disconnects the graph) must lie in any spanning tree of the graph. So when searching for such arcs (subsets Sk), we can limit ourselves to an (arbitrary) spanning tree (of G~ In particular when decomposing G o into the G o, we can apply the successive procedure according to Section A.4, where the nodes of any connected component are subdivided according to their distance from a selected reference node. In this manner, if the procedure is carried out in all the details we also obtain a spanning tree (say) T k of each G o (that is not an isolated node), and the predecessors of the nodes in T k. Using this information, we can find the inverse (say) R k of the reduced incidence
40
Material and Energy Balancing in the Process Industries
matrix of each Tk, as described in detail in Section A.3; see (A.4)-(A.6) with (A.9) where Are d stands for the reduced incidence matrix B k of G o occurring in (3.2.4). The matrices R k are obtained directly, without numerical inversion. On the other hand, as shown in the last two paragraphs of Section A.3, we thus can find the set Sk of arcs separating G ~ Indeed, having decomposed
Bk = (Bk, Bk)
(3.3.1)
where Bk is the reduced incidence matrix of T k , u s i n g R k = (Bk) -1 We can transform the whole equation (3.2.4)~ (k = l,--., K') into tt
tt
m k + RkBkm k + RkAk m+-
0
(3.3.2)
where the unknown subvector m k is partitioned as corresponds to (3.3._1). The matrix R k B k is the matrix (Cij) occurring in (A.12 and 13) and computed by (A.11) with (A.10); the zero rows of the matrix identify the arcs i ~ S k . In this manner, the classification is complete; the remaining arcs determine the unobservable variables. In addition, we can obtain also the matrix Rk Ak ready for further computation (3.3.2). [Observe that computing the elements of R k Bk, we substitute n k (reference node in G ~ for n o in (A.10). The reader can easily verify that also the elements of R k A k can be computed in this manner; considering G O[N k , j0], in (A.11) we put Rink - 0 as well as Rin - 0 whenever n ~ Nk.] See the example in Section 3.4. Having completed the classification according to steps (a) and (b) above, we can make use of the additional information obtained in the described manner. First, the reduced graph G* determines, having selected a reference node, the reduced incidence matrix A*. It is the matrix occurring in (3.2.4) 2, thus in the constraint equation for the measured vector m + (in fact, only for the subvector m* of redundant variables). The equation is employed for adjusting the given values; if the components of m + have been actually measured then for reconciliation by statistical methods. Having adjusted the components of m + and on introducing the adjusted values into Eqs.(3.3.2), we can compute directly the observable components of vectors m k. In addition we thus obtain certain conditions constraining the remaining (unobservable) components of the unmeasured vector. Though unobservable (thus admitting an infinity of solutions), they are generally not arbitrary. The whole vector of solutions will lie on a 'linear affine manifold' (as the mathematicians put it), thus on a subset of lower dimension than has the whole vector space of unmeasured variables. As a simple example, imagine a straight line or a plane in threedimensional space; for example if the manifold is a straight line in space (x, y, z), parallel to the plane (x, y) in a distance z0 (but not parallel to any of the axes), the variable z - z0 is observable, but x and y are
Chapter 3 - Mass (Single-component) Balance
41
unobservable, nevertheless subjected to the condition of lying on the projection of the straight line into the plane (x, y).
.sr, s ssJ' ..-"
Z0
Fig. 3-8. Observable variable z
Interpreted in terms of balance equations, the figure represents the solutions of a subsystem (3.2.4) k where the connected component G o drawn with incident fixed streams can look like
,
..
2
x t
' k
Fig. 3-8a. Interpretation of Fig. 3-8 unknown; ~ fixed
3
j
42
Material and Energy Balancing in the Process Industries
One of the node balances has been eliminated by graph reduction (as the merged-nodes balance) and the remaining two read m 1
-
m
2
m + i -0
-
+
mj - 0
m 3 -
We set m 1 - x, m2 = y, m3 = z, a n d mj + = z 0 , 9mi§ is length of the segment on the x-axis in Fig. 3-8. But in spaces of higher dimension, there are more possibilities (not just straight lines or planes) having not individual names and defying any geometric imagination. In a more general frame, the possibilities will be examined in Chapters 7 (linear systems) and 8 (nonlinear systems).
3.4
ILLUSTRATIVE EXAMPLE Let us have graph G of a mass balance system
l; 11
7
e
i13
10 h
y
a
3
b
6/
Fig. 3-9. Example of mass balance system measured; ..... unmeasured
where the reference (environment) node n o has not been drawn. The arc set J is partitioned
43
C h a p t e r 3 - Mass (Single-component) Balance
j o _ {3, 4, 6, 7, 8, 12, 13} and J+-
{1, 2, 5, 9, 10, 11, 14, 15}.
So G~ j0] is defined. The simple figure would allow one to solve the problem by mere inspection. But our goal is to illustrate the formal procedure as outlined in Section 3.3. The decomposition of G o starts from some node, say no (environment), giving the connected component G~~ N~ - {no} , j]0 _ O (isolated node). Let us further select node a; we have successively, according to Section A.4 j~l) = -{3 } , j~2) _ {4, 6} , j(3) _ { 7, 8 } ,
N ~l) = {b } N (2) - {c, d} N (3) - {e }
(distance one) (distance two) (distance three)
j ( 4 ) _ Q~ .
We have thus determined G2~ N 2 - {a, b, c, d, e} , J2 ~
{3,4,6,7,8}
with the structure c
O r i i
i i i
"8
4!
b I
| ! |
o
a
3
b
1 1i
6
~:3d
Fig. 3-9a. Component G2~
From the remaining nodes, let us take node f; we find j(1) _ { 12 } ,
j(2)_ { 1 3 } , j(3)_
N (~) - {h) N (2)- {g}
44
Material and Energy Balancing in the Process Industries
hence we have the connected component G3~ N 3 _ {f, g, h} , J3 ~
{12, 13}
with the structure g O I I I
,, |
', 13 ! !
1
f
12
Fig. 3-9b. Component G3~
and no other node remains. We have K - 3 and let us merge the nodes in each N k. The unmeasured arcs are deleted. Let h k be the node obtained by merging N k. Then the incident nondeleted arcs are with
ill" 1, 5, 9, 14, 15 h 2" l, 5, 9, l0 (arc 2 deleted) fi3" 10, 14, 15 (arc 11 deleted).
We thus have J*= {1, 5, 9, 10, 14, 15} and J ' -
{2, ll} (nonredundant).
In this manner graph G* is defined. It has the structure
(3.4.1)
Chapter 3 - Mass (Single-component) Balance
43
14
15
Fig. 3-9c. Reduced graph G*
Observe that the subgraphs Gk~ as well as G, are determined by the original graph G[N,J] with the partition J - jo u J+ and by the prescribed algebraic graph operations; the drawings are only illustrations for the reader. Going back to the components Gk~ of G ~ let us find s p a n n i n g trees T k. G1~ is trivial (isolated node). In G2~ let us start from N~3~= {e }. Again according to Section A.4, from the two arcs j ~ jc3) incident to node e let us s e l e c t for instance in j~3): j ( e ) - 7 thus p ( e ) = c and further, in our simple example uniquely in j(2). j ( c ) = 4 thus p ( c ) - b and
j(d) - 6 thus p(d) - b
finally in J~>" j ( b ) - 3 , while p ( b ) - a is the (chosen)reference node in G2~ Hence the arc set of T 2 is {3, 4, 6, 7}, the
46
Material and Energy Balancing in the Process Industries
node set is N 2. The reader can find the tree T 2 in Fig. 3-9a, having deleted arc 8. Thus c = p(e)
7 =j(e)
()- . . . . . . . . . .
e
t~3
4 =j(c)
Ir
0
t~0
a = p(b)
3 =j(b)
---I~O
b = p(c) = p(d)
6 =j(d)
d
Fig. 3-9d. A spanning tree of G2~
The i n v e r s e R 2 of the reduced incidence matrix is found as in the example at the end of Section A.3: for each node n e N 2, the reference node excluded, we go backwards through the sequence of predecessors. We have b
c
d
e
Ab3
Ab3
Ab3
Ab3
j(b) = 3
Ac4
j(c) = 4
Ac4
R2
J
Ad6
j(d) = 6 Ae7
j(e) = 7
denoting by Anj the elements of the reduced incidence matrix, hence
R2=
b
c
d
e
1
1
1
1
3
0
-1
0
-1
4
0
0
1
0
6
0
0
0
1
7.
According to (3.3.1) we have
(3.4.2)
47
Chapter 3 - Mass (Single-component) Balance B 2 = (B2' , B2" )
} r o w s b, c, d, e
column 8
where
( B 2 ' ) -1 = R 2
and where, with the notation as above
Ab8
0
Ac8
m
B21!
0
Ad8
-1
Ae8
1
.
Recall that generally, the zero rows of R2B2" determine the arcs i ~ $2 that separate G2~ thus denoting by Cij (A.11 and 10) the elements of R2B2", i e $2 if and only if Cij = 0 in all columns j. In our special case, the only column is j = 8. We find C38=
0
G8 = -1 c68 = -1 G8 = 1
(3.4.3)
thus S 2 --{3}
is the set of arcs that separate G2~ Further, as I J3~ - IN 31 - 1, G3~ is a tree, thus T 3 = G3~ See Fig. 3-9b; we find j ( g ) = 1.3 , p ( g ) = .h , j ( h ) = 1 2 , p ( h ) - f
(reference node)
and h
g
R3 / 1 , ) 1 2 0
-1
We have directly S 3 = J3 ~ = { 12, 13 }.
13.
(3.4.4)
48
Material and Energy Balancing in the Process Industries
The classification is complete. The set S=S2uS
(3.4.5)
3= {3, 12, 13}
determines the set of unmeasured observable variables mj (j ~ S), and with (3.4.1), J* (resp. J') determines that of redundant (resp. nonredundant) measured ones. In addition, the incidence matrix of G* determines the conditions the measured variables have to obey in order to have the system solvable. Taking node h~ as reference node, the reduced incidence matrix equals (cf. Fig. 3-9c)
A* -
1
5
9
10
1
-1
1
-1 1
14
15
) -1
-1
h2
(3.4.6)
h3
and the condition (3.2.4) 2 reads m~- m5 + m9- m~0
=0
/~10- /~14- /~15
J
= 0
(3.4.7)
where fil (of components rhj, j ~ J+) is the vector of a priori fixed variables. The conditions (3.4.7) obeyed, we can substitute fil for m + in (3.3.2). We have 1
2
5
1
-1
A2
9
10
11
14
15
c 1
d
-1
e (3.4.8)
(having deleted reference node a), and
A3:/
1
2
5
9
10
11
11
14
15
-1
h
Chapter 3- Mass (Single-component) Balance
49
(having deleted reference node f). With m3 m4
m2
tt
~
m2 - (m8) m6
/ m2)
(3.4.9)
m7
m3
m13
the unmeasured variables are subject to the conditions
-1 m 2 +
m 8
+ R2A2ffl-
0
-1
(3.4.1o) and + R3A31fll -
m 3
0
according to (3.3.2) with (3.4.3), making use of the results (3.4.2),(3.4.4),(3.4.8). The whole space of unmeasured variables (unknowns) is of dimension 7. Given lh obeying (3.4.7), the set of solutions forms a (7-6=) 1-dimensional linear affine manifold (a straight line in 7-dimensional space), with the coordinates m 3, m~2, m~3 uniquely determined by the conditions (3.4.10). We can assign an arbitrary value to any one of the variables m4, m6, mT, m8, then the remaining ones are also uniquely determined by the conditions.
3.5
JUST DETERMINED SYSTEMS
The analysis of solvability applies in particular (and more simply) to systems where the set of a priori given variables' values just determines those of the remaining ones. We consider the graph GIN,J] as in Section 3.1. Denoting again by J+ the set of streams corresponding to the variables to be fixed and j 0 _ j _ j+, the partition determines the subgraph G o [N, jo]. A sufficient and necessary condition for the unique determination reads clearly G O is a tree
(3.5.1)
Material and Energy Balancing in the Process Industries
30
thus a spanning tree of G. [Recall that we assume G connected]. The subgraph G+[N,J § restricted to the arcs i ~ J+ is called the cotree of spanning tree G~ the arcs (called chords) determine certain degrees of freedom of the system (3.1.6). From a pure algebraic point of view, the mass flowrates of streams represented by the chords can be chosen arbitrarily; of course the physical condition is that of positive (or perhaps also null) mass flowrates (with the exception of the fictitious accumulation streams as in Fig. 3-1b). The number of degrees of freedom is thus D-
[JI - ( I N I
- 1)
(3.5.2)
called also the nullity of (connected) graph G; it is also the dimension of the null space KerC of reduced incidence matrix C. The choice of G o, thus also the selection of the chords thus degrees of freedom is by far not unique; only the number D is uniquely determined by G. As shown in Appendix A (A.18), the set Sp(G) of the trees G o has
I Sp(G) I
= det(CCT) "
(3.5.3)
elements; such is also the number of possible choices of the set of chords. To some extent, the selection of the chords can be controlled by our a priori idea of which values have to be fixed preferably. Let P ( c J) be the corresponding set of preferred arcs. In Appendix A, we have given two methods of finding a spanning tree of connected graph G. The selection of any new arc (called branch)j of the tree can be subjected to the condition that, as far as possible, j ~ P. So in the strategy (i)-(iii) according to Section A.5, instead of taking the minimum j ~ S we select, as far as possible, j ~ S but j ~ P (else arbitrary; taking the minimum corresponds to an ordered set with increasing preference). Then the chords remaining as J - R after the final step belong, as far as possible, to the preferred set P. Irrespective of how we have obtained the spanning tree G o, we choose a reference node n o ; in the mass balance problem, it will be clearly the environment node, thus C is the matrix in (3.1.6). We now can classify the nodes (units) n ~ N u = N - {no} according to their distance from n 0. Thus N is
partitioned N - {no} u N(~)u ... u N Cp)
(3.5.4)
where N (p) is the set of nodes of distance p, P is the maximum distance. We put N (~ = {no} and given p >_ 0 and N (p), let A (p) = {no} k.) ... k.) N (p). Then N (p+~) is the set of nodes n ~ N - A (p) that are connected by some arc j ' ~ jo with some n' E N(P); the set of such arcs j ' is j(p+l) and we have the partition
C h a p t e r 3 - Mass (Single-component) Balance
31
jo = J(~)u ... u j(r,)
(3.5.5)
of the arcs of G O (not perhaps of all the arcs of G[N,J]). In fact this is the construction according to Fig. A-11 using the fact that G O is a tree. From the theory it then follows that for each n ~ N ~p+~), there exists just one arc j ' having the other endpoint in N Cp), denoted by j(n) (~ J(P+])), and the other endpoint n ' = p(n) (~ N (p)) is called the last predecessor of n ; cf. Fig. A-8. We have j(P+l) = Q~.
3
c
6
1://
"o
',
g
i
no
: L.,
b
i~I
e IF~ ~ I
~
~I
IF ~
i
nodes
N {~
N (-~)
N (3)
Fig. 3-10 Tree G O for example jr2) = {3, 4, 5 } is the set of arcs j(n), n ~ N ~2)
Observe that the distance classification need not represent the distance classification with respect to the whole graph G. Imagine a chord connecting nodes n o and e; then also node e is in distance 1 from no and the whole classification will be different. Then also a tree obtained by the algorithm given in Section A.4 and starting from node n o cannot be G O as drawn in Fig. 3-10.
Let us have a spanning tree G o with the partition of J into jo and J+. Having fixed certain values m~+ for i ~ J+, the solution in mj (j ~ jo) is unique. Having partitioned the matrix C C
=
(B
, A)
} rowsn~
Nu=N-
{no}
(3.5.6)
columns j~ jo ie J+ the solution of Eq.(3.1.6) is m~
B-JAm +
(3.5.7)
52
Material and Energy Balancing in the Process Industries
where m ~ is vector of components mj (j ~ j0), m + that of given m + (i ~ J+) In Appendix A, we have given an explicit formula (A.4 and 5) for the inverse B -J Recall that B is reduced incidence matrix of tree G o thus in (A.5), A' stands for B. The computation is based on the knowledge of the predecessors p(n), p(p(n)) etc. and the connecting arcs j(n), j(p(n)) etc.; as an example, see Section 3.4, matrix R 2 (3.4.2). In fact, we need not compute the inverse B -~ and can find the solution directly on rearranging matrix B into upper-triangular form. The procedure is again based on the knowledge of p(n) and j(n). By the one-to-one correspondence, we have p - 1, ..., P: IJr
l -
I N( )I
(3.5.8)
hence in the first step, the partition of B (and also row-partition of A) reads, for example for P = 4 j(p)
///// / /,/,/,/
///// A
Fig. 3-1 l a. Triangularisation of matrix B, first step
where the void fields in B are zeros. Indeed, any n ~ N (p) is incident with (just one) j(n) ~ J~P), and generally with (possibly several)j' ~ J~P+~)(if p < P); each of the j ' is j(n') ~ j~p+l) for some n' ~ N Cp+l) , while n ~ N ~p) is not incident with any j" ~ J~P") where p" < p or p" > p + l , because the arcs incident to n span the distance 1. It can also happen that a branch ends the tree at lower distance from n o than P, thus some n ~ N ~p) can be incident only with one j(n) even if p < P. We can further rearrange arbitrarily the elements in each N Cp), and then re-order
Chapter 3 - Mass (Single-component) Balance
53
the set J(P) in the manner that the n-th column in J(P) is j(n); the (n,j(n))-th element of B is then the unique nonnull (thus _+1) element in row n and column subset J(P) Then each field N(P)x J(P) in B is diagonal j(p) A
r
+_1
N(p) ,
j(n) Fig. 3-11 b. Triangularisation, second step
and in addition, at the RHS of the field we have nonzero field N(P)x j(p+l), unless p = P. Below the diagonal, we have zeros in all rows of B (thus B is upper triangular). The upper-triangular format of matrix B allows one to compute successively the solutions from below. In the last group J(P), the solutions mj where j = fin) with n ~ N (P) are each given as Cnj(n)-times the n-th component of vector (-Am+). Introducing the values of these mj into the equations of rows n N (p-l), w e compute mi for j ~ j(P-l), and so on. Besides, the reader certainly knows how to manage standard operations with triangular matrix B. Example Rearranging the nodes n e N u and arcs j ~ j0 according to Fig. 3-10 the matrix C reads j(1) ,Ik
9
9
1 a N (1)
b c (2)
1 -1
,%
9
2
3 j -1 I j
j(3)
4
9
5
f g
A
9
6
7
-1 1
1
d e
N (3)
j(2)
-1 -1
-1
A
54
Material and Energy Balancing in the Process Industries
Having triangularized the matrix B, it is ready for use in a general analysis of solutions (3.5.7) with arbitrary m +. Otherwise, given m + an even simpler variant not requiring the distance classification is possible. It is based on the following properties of a tree T. Let us call endpoint of tree T any node n incident with just one arc j. Then deleting arc j and node n, we have again a tree. (ii) Any tree has at least two endpoints. [This an easy consequence of (A.3); for (ii), use induction.] Let now n be an endpoint of the tree G ~ n ~ n o, j - j ( n ) the unique arc incident to n in G ~ Then Eq.(3.5.7) with (3.5.6) reads Bm ~ - - Am + and the n-th scalar equation is (i)
Cnimj = - ~ n m + (Cnj - +1)
(3.5.9)
where c~, is the n-th row vector of A; indeed, C n i --- 0 for any i ~ j , i ~ jo. Going through the nodes n ~ N we thus can find, by (ii), an endpoint n ~: no and compute mj (j = j(n)) by (3.5.9); the solution is rhj. We delete the n-th equation and set mj - rhj in the remaining ones. We have thus deleted arc j and node n in G ~ and have again a tree with node set N - {n } and arc set jo _ {j} (unknown variables), while the set of fixed variables is now J§ w {j}. Continue in this manner so long as some unknown variable remains. Of course the former 'classifying method' provides a special sequence of such operations. Conversely, the latter sequence of nodes n and arcs j(n) determines a triangularisation of matrix B.
Remark More generally, let us consider the case where all the unknown (unmeasured) variables are observable. As shown in Subsection 3.3.1, the necessary and sufficient condition is that the connected components Gk~ ( k - 1,-.., K) of G~ j0] are all trees. According to (A.1 and 3), this is equivalent to the condition
IN! - g - - IJ~
.
(3.5.10)
If so and if K > 1, we have the solvability condition (3.2.4) 2. Having adjusted the fixed (measured) values so as to obey the condition, the unknown variables can be computed according to (3.2.4)~ where the K' matrices Bk are reduced incidence matrices of the (nontrivial) trees Gk~ Then the solutions can be computed as above, most simply using the endpoints; see (35.9) and the subsequent paragraph.
Chapter 3 - Mass (Single-component) Balance
3.6
55
MAIN RESULTS OF C H A P T E R 3
The basic idea is that of the oriented graph of a technological system subject to balancing; see Section 3.1 and Appendix A. The graph (G) contains nodes n ~ Nu, which are the individual units of the system, plus one formally introduced node n o representing the (so-called) environment; hence the node set (N) of G is the union (3.1.4). The arc set (J) consists of streams between the units, oriented according to the direction of material flow; arcs whose one endpoint is n o represent inputs/outputs into/from the system. If not stated otherwise, also in the following chapters G[N,J] represents the technological system subject to balancing, with units n ~ Nu and oriented material streams j~J. If only mass is balanced we can formally admit a change in accumulation of mass in a node as a fictitious stream oriented towards the environment; see Fig. 3-1. The conservation of mass is then expressed as Eq.(3.1.6) thus Cm - 0 where m is the (column) vector of mass flowrates and C the reduced incidence matrix of G, thus without row n 0. We assume G connected, hence C is of full row rank (3.1.5) thus INn [ where I MI denotes generally the number of elements of set M. The problems of solvability arise when certain mass flowrates mj are given a priori; see Section 3.2. The graph structure allows one to analyze the problems completely by graph operations. The arc set J is partitioned j = jo u J+
(J+ n jo = 0 )
(3.6.1)
where J§ is the subset of streams (arcs) with a priori given mass flowrates. Restricting graph G to arcs j ~ j0 (thus deleting arcs j ~ J+) we have subgraph G~ see Fig. 3-6. The subgraph is generally no more connected; it can be uniquely decomposed into (say) K connected components Gk~ of node sets Nk and arc sets Jk~ thus G0[N, j0] is union of Gk~
Jk0],
k = 1,--., K.
(3.6.2)
Recall that a connected component can also consist of one (isolated) node, with empty subset of incident arcs. Having merged the nodes of each Nk in G we have the reduced graph G*; see Fig. 3-7. The K nodes of G* correspond uniquely to the K subsets Nk of N. By the graph reduction (merging), we have deleted all the arcs j ~ jo, and some arcs j ~ J+ in addition (subset J ' c J+). The arc set of G*, denoted by J*, consists of the remaining (not deleted) arcs j ~ J+. Thus J§ is partitioned J+ = J* t,.,) J' (J* c3 J' = 0 ) .
(3.6.3)
56
Material and Energy Balancing in the Process Industries
The subgraph G ~ the decomposition (3.6.2) of G ~ the reduced graph G*, and the partition (3.6.3) are uniquely determined by G and by the assumed partition (3.6.1.) of streams. Of course if K = 1 (G o connected) then G* is reduced to one isolated node and J* = O, J' = J+. In the first step, having re-arranged the variables and equations according to the graph decomposition, we have thus rewritten the balance equation Cm = 0 (3.1.6) in equivalent form (3.2.4). The last of the equations (3.2.4) reads A'm* - 0
(3.6.4)
where m* is the subvector of mass flowrates mi, i ~ J*, A* is reduced incidence matrix of graph G*, of full row rank K-l; Eq.(3.6.4) is absent if K = 1. The equation represents the (necessary and sufficient) condition of solvability: the a priori given values of m i (i E J*) must obey Eq.(3.6.4). The vector m* is subvector of vector m +, the latter of components m i , i ~ J+ (D J*); if Eq.(3.6.4) is obeyed and if the remaining a priori given m i (i E J') are arbitrary, the whole set of balance equations is solvable in the components mj, j ~ j0 (3.6.1). Any such solution is that of the subsystem (3.2.4)~. Here, we consider the subgraphs Gk~ (3.6.2) in number K' (< K) that are not isolated nodes (thus such that Jk~ 0 ) . According to the partition of the set jo into nonempty subsets Jk~ we form subvectors mk (k = 1, ..., K') of components mj , j ~ Jk~ then the incidence matrix of Gk~ operates on mk. In each Gk~ we can select a reference node (say nk~ one of them being the environment node no); then Bk is reduced incidence matrix of Gk~ On the other hand, having partitioned the rows of the whole incidence matrix of G according to the node subsets Nk, having deleted nk~ in subset N k we obtain submatrices A k (k = 1, ---, K') operating on subvector m + of m i , i ~ J+. Schematically jo
j+ ,,,~
0 F/k
Nk
0
I I I I------I I
I I I
I
I
I I I
tlk
I
0
Ak
I I I
Then the solutions mj (j ~ j0) are exactly those of the set of equations k = 1, ..., K'"
Bkm k + s
--
0 where c k -
Ak m+
(3.6.5)
Chapter 3- Mass (Single-component)Balance
57
are constant vectors determined by m +, provided Eq.(3.6.4) is satisfied. Here, each Bk is of full row rank, hence the set of equations (3.6.5) is (not necessarily uniquely) solvable. The structure of the graph G along with the partition (3.6.1) allows one to classify all the variables (mass flowrates) with respect to the solvability; see Section 3.3. According to the standard terminology, the variables mi, i ~ J+ are called measured, the remaining mj (j ~ j0) unmeasured. This classification will be used henceforth; any a priori fixed variable of a model will be called 'measured', else 'unmeasured'. The classification of the measured variables j* follows immediately from the partition (3.6.3); if i ~ then m~ is redundant, else (i ~ J') nonredundant. The nonredundant variables are also characterized by the property that i ~ J' if and only if arc i closes a circuit in G with certain unmeasured streams (j ~ j0). The nonredundant variables are unaffected by the solvability condition. The unmeasured variables are subject to the conditions (3.6.5), given the measured values obeying the solvability condition. Some of the mj (j ~ j0) are thus uniquely determined; they are (called) observable. A necessary and sufficient condition for mj to be observable is that arc j separates subgraph GR~ where j JR~ by the decomposition (3.6.2), there exists a unique k such that j ~ Jk~ In particular, the whole subvector of unmeasured variables is observable (uniquely determined) if and only if all the subgraphs Gk~ are trees (possible isolated nodes included). An unmeasured variable is called unobservable when it is not observable (thus lies in some circuit of subgraph G~ In Section 3.3, we give a method of classifying the variables simultaneously with transforming the equations into a form suitable for explicit computation. First, the components of rn* have to be adjusted so as to obey Eq.(3.6.4). Then, by further graph operations the equations (3.6.5) are transformed in the manner that the observable variables are directly expressed as (linear) functions of the measured ones. See also the illustrative example 3.4. If in particular all the unmeasured variables are observable and no measured variable is redundant, the system is called just determined; see Section 3.5. A necessary and sufficient condition is that the subgraph G~ ~ is a tree thus a spanning tree of G[N,J]. This is a special case in Section 3.2 where thus G o is connected, the condition (3.6.4) is absent, and K ' = K - 1 in (3.6.5); thus BR - B (reduced incidence matrix of G ~ and AR = A is the remaining submatrix of C - (B,A). Instead of matrix inversion, the equation can be solved by rearranging matrix B into upper triangular form; see Figs.3-11 a,b. The set of mass balance equations provides an example of a linear model. It will be shown later in Chapter 7 that for any linear model, an analogous transformation of the equations and unambiguous variables classification is possible using the methods of classical linear algebra.
58
3.7
Material and Energy Balancing in the Process Industries
R E C O M M E N D E D LITERATURE
A pioneering work in the classification of variables is due to V~iclavek (1969). The application of graph methods to the problems of solvability of balance equations and reconciliation is then due in particular to R.S.H. Mah and his school (Mah et al., 1976); an overview can be found in Mah (1990). See also the literature to Chapter 5. Mah, R.S.H (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Mah, R.S.H, G.M. Stanley, and D.M. Downing (1976), Reconciliation and rectification of process flow and inventory data, I&C Proc. Des. Dev. 15, 175-183 V~iclavek, V. (1969), On the application of the calculus of observations in calculations of chemical engineering balances, Coll. Czech. Chem. Commun. 34, 364-372
59
Chapter 4 MULTICOMPONENT BALANCING
In the previous chapter, we have dealt with single-component balances, thus with the case when only one quantity is balanced around each node. A multicomponent balance is a set of several component balances. In chemical process networks, the components are certain chemical species present in the streams as the components of a mixture. Generally, the species can be transformed into one another by chemical reactions; so their quantities may not be conserved individually. The individual balances are then not independent, as they must obey stoichiometric laws. This chapter deals mainly with 'steady-state' chemical species balancing where chemical reactions are admitted; the wording 'steady state' is explained below. Formally precise unsteady-state balancing brings some problems, mainly because the 'holdup' (accumulation) of a component in a unit is difficult to identify, due to spatial variability of the concentrations. See Section 4.7. The reader is recommended (at least) to browse Appendix B, Section B. 1 B.8 for the notions of linear algebra. -
4.1
CHEMICAL REACTIONS AND STOICHIOMETRY
Chemical species, brought into contact in a mixture, interact among themselves. The interaction can be weak (negligible in ideal mixtures), in the manner that any component of the mixture remains identifiable by physico-chemical methods. Imagine a mixture of alcohol and water, or an almost ideal mixture of nitrogen and oxygen in atmospheric air. Such mixtures are regarded as nonreacting. A class of strong interactions is called chemical reactions; imagine burning of hydrogen 2H 2 +
0 2 -
2H20
in air. Nitrogen does not participate in the reaction; it is a nonreacting ('inert') component. A chemical reaction is thus a change in the molecular configuration of the mixture. In chemistry, the molecules are represented by chemical formulae; so in the above example we imagine that two (diatomic) molecules H 2 and one molecule 02 produce two molecules H20. Perhaps the actual mechanism is more involved; only the result is the same. Preserving the idea that the chemical
60
Material and Energy Balancing in the Process Industries
individua participating in the reaction are H 2 (not perhaps monatomic H, though possibly present in an intermediary configuration), O2, and H20, the reaction can also be written as H 2 + 1/202 = H 2 0 . The information contained in both formal reaction schemes reads:
(a) (b) (c)
The reaction participants are H 2 , 02, H20 The reaction product is H20 The molecular ratio of the participants is 2:1:2 = 1:1/2:1.
Imagine further burning of gaseous sulphur. Gaseous sulphur can be present in different (polyatomic) configurations, but this information is either unknown or irrelevant; we thus regard sulphur as formal chemical species S. We then have the reaction scheme S + 02 = SO2
(s~)
and in excess of oxygen, further oxidation can take place S02 + 1/202 = S03.
(s9
Writing the second reaction in this manner makes sense if we have (as we actually do) an idea of the reaction equilibrium, possibly also of the reaction kinetics. Indeed, the reaction is 'reversible': at higher temperatures, it can proceed in opposite direction, and in an industrial sulphur burning unit, one finds only relatively small amount of SO3 in the outlet gas, although the reactivity (tendency to achieve equilibrium) increases with the temperature. On the other hand, from the standpoint of balancing proper the second reaction can be replaced by the scheme S + 3/202 = S03
(s3)
that follows from summation of the above two reaction schemes. One can imagine as well that a part of sulphur burns directly to sulphur trioxide. However formal can be the character of the reaction schemes, they must anyway obey the laws of chemical stoichiometry, based on the following elementary idea: Any molecule is composed of atoms and (disregarding nuclear reactions) the number of atoms in any reaction remains conserved. Any chemist readily checks a reaction scheme on counting, for each atom species present, the
Chapter 4 -
Multicomponent Balancing
61
sum of numbers of atoms on both sides of the scheme; thus two plus one atoms of oxygen on the LHS equal three atoms on the RHS of the reaction SO 2 + 1/202 = SO3. From the molecular point of view, the actual reaction mechanism may involve several steps in which the particles collide, deform, tear and re-group into other particle configurations. Hypothetically, the 'relaxation times' of the individual steps along with their frequency determine the reaction kinetics of the summary reaction. Macroscopically, for example the rate of the reaction SO2 + 1/202 = SO 3 can be interpreted as the number of molecules of SO3 arising by the reaction in unit volume per unit time; or, measured in conventional units, as the corresponding number of moles. Observe that when defined in this manner, the reaction rate becomes negative if the reaction as written proceeds in opposite direction. The definition of the reaction rate (say, w) depends on how the reaction is written. Consider for instance oxidation of ammonia 4NH 3 +
502
-
(rl)
4NO + 6H20 .
There are two reaction products; so as to make w independent of the choice of the product to which it is related, one defines w in the manner that 4 w resp. 6 w is the number of moles of NO resp. H20 arising by the reaction, and also 4 w resp. 5 w is the number of moles of NH 3 resp. 02 consumed by the reaction, again in unit volume per unit time. One could also write (r,')
2NH 3 + 5/202 = 2NO + 3H20
with reaction rate w' = 2 w; then 2 w' - 4 w, (5/2) w' = 5 w etc. are the same quantities as above. Physically, the process is the same; the conventional way of writing the summary reaction leads to the conventional definition of the reaction rate. Thus if, in the reaction al A1 + "-- + an An = bl B1 + ... b m B m
(4.1..1.)
Pi resp. qj is the number of moles of B i produced resp. of Aj consumed (in unit volume per unit time) then Pl
Pm
ql
w . . . . . . . . . . . . bl bm al
qn
(4.1.2)
an
is the reaction rate. As above, w < 0 means that actually, the reaction takes place in opposite direction with respect to the convention (4.1.1). In algebraic
62
Material and Energy Balancing in the Process Industries
operations that will follow later, it is convenient to write reaction (4.1.1) in the form (4.1.3)
(-a~)A~ + .-. + ( - a n ) A n + b~ B 1 + ... + b m B m = 0
thus with positive stoichiometric coefficients (b~, -.., b m) for reaction products, negative ones ( - a l , - - - , - a n ) for chemical species consumed by the formal reaction. The oxidation of ammonia is accompanied by the side reaction 2NH 3 + 3/202 = N2 + 3H20 ; also further oxidation can take place NO + 1/202 = NO2.
(r3)
The chemical species occurring in the three reactions (r~, r2, r3) are Ck = NH3, 0 2, NO, H20, N2, NO2. We can introduce the matrix S of elements vk~, which are the stoichiometric coefficients at species Ck in reaction r, written according to the convention (4.1.3). Thus in the given case r~
r2
r_ 4
-2
-5
-3/2
4 S
r3 NH3 -1/2
O2
-1
NO
.~
6
3
H20 N2 NO2 .
We call S the stoichiometric matrix of the set of reactions. [By another convention, one can also call 'stoichiometric matrix' the transpose ST.] So generally, one can consider (say) R chemical reactions, written in form (4.1.3) K
E Vk~C k = 0
k=l
( r - 1, ..., R)
(4.1.4)
among certain K chemical species C~, ..., CK, where vk~ > 0 if C k is (regarded as) a reaction product in the r-th reaction; thus if Ck = NO then Vk~= 4 in the
Chapter 4 - MulticomponentBalancing
63
first oxidation reaction (r~), Vk~ = O, and Vk~3 = - 1 in the third reaction (r 3 ). If now w r is the r-th reaction rate then (4.1.5)
Pkr : Vkr Wr
is the number of moles of species Ck produced formally by the r-th reaction; we can have Pkr < 0 either because Vk~ < 0 with Wr > 0, or also with Vk~ > 0 (formal reaction product) but w~ < 0: the actual direction of the reaction is opposite with respect to the conventional scheme (4.1.4). For example if again Ck = NO then P k q -- 4w~ and Pkr3 = - W r 3 , thus the number of moles of NO produced formally by all the reactions considered equals Pk -- 4Wq
-
Wr3
in unit volume per unit time. In fact, reaction r 3 takes place mainly in the second stage of an industrial reactor. Integrating over the whole reactor volume we have Pk - 4 W q -
Wr3
for the total production rate of Ck = NO, in mole units. Here, Wr is integral reaction rate of the r-th reaction. Generally, if Mk is formula (mole) mass of species Ck then its integral production rate equals R
M k P k - - M k ,=Z1vk~ W~
(4.1.6)
in mass units (kilogrammes) per unit time. In particular if the reactions are independent, thus if the matrix (Vk~) is of full column rank R then conversely, the integral reaction rates Wr are uniquely determined by the integral production rates; see Section 4.5, Remark. Introducing the reaction rates makes sense if we have at least some idea of the reaction mechanisms and kinetics; for example one can well suppose that in the oxidation of ammonia, the final product (NO2) is produced via reaction r~ (accompanied by side reaction r 2 ), and reaction r 3 as the last oxidation step. Otherwise, in balancing proper the reaction rates can be eliminated as shown later in Section 4.3.
4.2
C O M P O N E N T MASS BALANCES
Let us first consider the balance of one node (unit). In contrast to Chapter 3, we shall not consider the case where the accumulation of a chemical
64
Material and Energy Balancing in the Process Industries
species mass can change in time. To be less rigorous, such (possible) change is neglected; if so, we obtain the steady-state balance. Neglecting formally the change in accumulation does not necessarily imply that the flowrates, concentrations and the like are considered constant in time; only the error due to the neglection of accumulation terms is regarded as insignificant. In practice, this means in particular that nodes such as inventories are excluded from balancing. To begin with an example, the reader is requested to turn now to Section 4.6, Fig. 4-2. First, the steady-state convention requires excluding from the set of nodes subject to balancing the inventories of sulphur and produced acids; they are regarded as parts of the environment node. Now for instance the multicomponent balance of node B (sulphur burning unit)
11
elemental sulphur
combustion 3
~y
B
dry air
"~ 5
products
consists of the component balances of sulphur (S), oxygen (02), nitrogen (N2), sulphur dioxide (SO 2 ), and sulphur trioxide (SO 3 ), whose presence is admitted in the adjacent streams. If X is a component then Mx is its formula mass and Yx its mass fraction in stream i; let Ji be the oriented mass flowrate of the stream, positive for outlets (thus, e.g., J3 < 0). In the node B, we consider the two reactions (s~) and (s2) thus S -[- 0 2 - S O 2 a n d
SO2 + 1/2 02
- 803
according to Section 4.1; the reaction scheme (s3) [S + 3/2 02 -- 803] brings no further stoichiometric restriction. Let W~ and W2 be the respective integral reaction rates. Then the balance of oxygen reads Y32 J3 + y5 J5 (+ O) - M% (-W,- 1/2 W2 )
Chapter 4 -
MulticomponentBalancing
65
that of sulphur dioxide reads
(0 +) Yso2 5 J5 (+ 0) - Mso 2 ( W 1 -
W2)
and so on. The zeros (0) are written formally to recall that the component is absent in the stream (thus yx~ - 0 for X - 02 and SO 2 , and ys3o~- 0 because one neglects the presence of SO2 in the dry air from node D). Let us now generalize. The theoretical derivation of the balance can be found in Appendix C. With all the simplifications adopted, we have the balance (C.33); it has the plausible form Z outputs - Z inputs - integral production rate of species Ck, with (4.1.6). Thus formally I
R
Z y~ Ji - Mk ZlVkr W~
i=1
(4.2.1)
for the k-th species (component) Ck (k - 1, ..., K). Here, i - 1, ..-, I denotes the streams incident to the node and y~ is mass fraction of component C k in the i-th stream, averaged by (C.32); hence K
Z y~- 1
k=l
(4.2.2)
for any stream i. Further Ji is, by (C.31), the i-th stream oriented mass flowrate, with Ji > 0 for output streams. The RHS term in (4.2.1) represents the total production rate of species Ck by chemical reactions in the node. M k is k-th species formula mass and Vk~ the corresponding stoichiometric coefficient in the r-th formal reaction (C.1) thus (4.1.4) K Z Vkr C k - 0 k=l
(4.2.3)
(by convention Vk~ > 0 for reaction products). The formalism developed below requires writing all the K coefficients Vk~ even if some Vk~ = 0 for any r (a nonreacting species Ck ). Finally W~ (r = 1, ...', R) is the integral reaction rate of the r-th reaction in the node. A correctly written stoichiometric scheme (4.2.3) must leave the total mass unchanged, hence for any r
66
Material and Energy Balancing in the Process Industries
K
Z M k VR~= 0 .
(4.2.4)
k=l
With (4.2.2) thus the total mass conservation in the node I i=1
Ji -
0
(4.2.5)
is a formal algebraic consequence of the balances (4.2.1); it is the balance (3.1.1) without the accumulation term. A special case is that where the node is a splitter; as an example, see again Fig. 4-2, node S1 where the stream of dry air 2 is divided into combustion air 3 and stream 4 supplied to reactor R. Rigorously, a splitter is a node with one input and two or more outputs, say
i2
Fig. 4-1. Splitter
such that the material passing through the node is only divided into several streams, without any change in the thermodynamic state. In this chapter, let us only suppose that the composition remains unchanged. Then, whatever be
k-1,...,K Y~ = YR (say)
for i = 1, ..., I
(4.2.6)
is the same for all streams. Because, clearly, also the total reaction rate in (4.2.1) equals zero, the K balances (4.2.1) are formal consequence of the total mass balance (4.2.5), and vice versa. Hence for a splitter, the set of components' node balances can be rewritten as (4.2.5), (4.2.6), and (4.2.2). Let us now have again a system of units such as in Chapter 3, thus the oriented graph G with incidence matrix (Cnj). With the incidence and orientation convention (3.1.3) we have, for any stream (arc) i Ji -- -Cni mi
(4.2.7)
if n is the node considered above. Consequently, the balance (4.2.1) holds for any node n if rewritten in the form
Chapter 4 -
Multicomponent Balancing
n e Nu 9
67
R(n) Z y~ Cni m i + M k ]~ V k r (n) Wr (n) = 0
i~J
(4.2.8)
r= 1
for any k = 1, ..., K. The argument (n) refers to the n-th node; for a nonreaction node we have
R(n) =
0
0 with the summation
convention
Z = 0 . Here, K is the
r=l
n u m b e r of all chemical species present in the system. If species Ck is absent in stream i then y~ - 0. For any i e J we have the condition (4.2.2). The balance (4.2.5) is the balance (3.1.2), for any n e Nu. For example in Fig. 4'2 (Section 4.6) node n = B is sulphur burning unit. In the oriented graph of the system the node is incident with streams i = 3, 5, 1 1 thus CB3 = 1 , CB5 = - 1
, CB11 -"
1 , else
CBi = 0
9
In (4.2.8) thus occur explicitly only the variables (mass flowrates) m 3 , m 5 , mll and the mass fractions y~ for i = 3, 5, 11" other terms YkCBimiequal zero. In stream 3 (dry air) are present the species C 2 (oxygen) and C 3 (nitrogen) thus 9
y~=0fork;e2and3,
i
andy~+y~=
1
according to (4.2.2). Stream 5 represents combustion products, thus again the species C2, C 3, and in addition C 5 (sulphur dioxide) and C6 (sulphur trioxide); for the other k we have y5 = 0. Stream 11 is elemental sulphur (species C~) thus yl ~ = 1 and the other y~ = 0. The number of chemical reactions admitted S+O2 =SO2
and
SO2+ 1/2 O 2 = S O 3
is R(B) = 2 and with the the convention Vkr > 0 for reaction products We have
forr= 1: Vii(B) = V21(B ) = -1 , v51(B) = 1, else Vkl(B ) = 0 and for r = 2: V22(B) = -1/2, v52(B) = -1 , v62(B ) = 1, else Vk2(B ) = 0;
Wl(B ) resp. W2(B) are the corresponding integral reaction rates and M k is mole (formula) mass of species Ck. The species present in the streams incident to node B are C~, C2, C3, C5, C6, from which C3 is nonreacting (v3r(B) = 0 for r = 1 and 2). Species C4 (H20) occurring in other parts of the system is absent in the node B-balance; thus V4r(B) = 0 in both reactions and y~ = 0 for i = 3, 5, 11. The species C4-balance holds true trivially as 0=0.
In particular if node n is a splitter, the K balances (4.2.8) are reduced to (3.1.2) and (4.2.6) written for arcs i incident to node n, with (4.2.2). Let S ( c N u ) be the set of splitters, T u = N u - S the set of units (nodes) that are not
68
Material and Energy Balancing in the Process Industries
splitters; hence if n ~ T, then either the arrangement of incident streams is different from that in Fi~.4.1, or the unit is a separator admitting different outlet
Chapter
4 -
MulticomponentBalancing
69
Let us further designate
R(n) rk
(n)
-
Mkr=~_lVkr(n) Wr (n)
(4.2.11)
for k = 1, ..., K and n ~ N u , with the convention r k (n) = 0 if n is a nonreaction node. It is the total production rate of species C k in node n. Clearly, r k (n) = 0 if n ~ S. Then the complete set of balance equations (4.2.8) reads for n ~
Tu:
j~jy~
Cnj mj + r k ( n ) - 0
( k - 1, .-., K)
(4.2.12a)
and for S E
S"
j~jCsj mj
-
(4.2.12b)
0
with y ~ - y], = 0
for j ~ Js, k = 1, ..., K ;
(4.2.12c)
in addition we have the conditions K
j ~ J:
Z y~, = 1
(4.2.12d)
k=I
Recall that the equations (3.1.2) for every n e N~ are a consequence of the equations (4.2.12), because by (4.2.4) K
Z r k (n) = 0 for any n ~ N u .
(4.2.13)
k=l
Observe finally that the technology may preclude the presence of some species C k in some stream j; for example some stream can be pure water, atmospheric air, and the like. We then add to the equations (4.2.12) certain conditions fixing the composition of certain streams. We also can, for any k = 1, ..-, K, define the set E k ( c J) of streams where component Ck is (can be) present. Then the additional conditions read k= 1,...,K:
y~,-0
forj~
J-E k.
(4.2.14)
The summation in (4.2.12a) is then, in fact, only o v e r j ~ E k . In (4.2.12c) clearly Js ~ Ek implies Js c E k , and Js e J-E k implies Js n E k = O.
70
Material and Energy Balancing in the Process Industries
For example, again with Fig. 4-2, for k = 1 (species C~ = sulphur) we have E~ = { 11 }; elemental sulphur (stream 11) is completely burnt in unit B and absent in all other streams, thus y'~ = 0 if i ~ 11. For instance the set E2 of streams where oxygen (species C 2) is present contains, a.o., stream j = 2 = Js~, and of course also Js~ = {3, 4} c E 2 (oxygen is present); on the other hand Jsl ~ E4 (Ca = H20 is absent) and of course also Jsl n E 4 = O.
4.3
REACTION INVARIANT BALANCES
The applicability of the component balance equations with reaction terms is limited. It requires the knowledge of the reaction kinetics and then, the equations are rather part of a more complex mathematical model involving heat and mass transfer equations and the like. In balancing proper, the integral reaction rates W~(n) in (4.2.11) can be known only approximately or rather, they are unknown. We will now show how they can be eliminated from the set of balance equations. Let us return to the single node component balances (4.2.1). Let us designate I
n k - iZ=lY~Ji / Mk ;
(4.3.1)
it is the sum of outputs minus inputs of species Ck, in mole units. Let n be the column vector of K components nk. Then the K balances (4.2.1) read R
n =
Z W~ Sr
r=-I
(4.3.2)
where s~ is the column vector of components V l r , "'" , V K r , thus the r-th column vector of the stoichiometric matrix (Vk~); the order of the indices k is arbitrary. Let R be the vector space generated by the vectors s~. Consequently n e R
(4.3.3)
is the information drawn from the assumption (4.2.3) without explicit knowledge of the reaction rates; the assumption specifies certain admissible chemical reactions,thus certain 'degrees of freedom' for the composition changes (4.3.1) in the node. The same space Rcan be generated by an infinite number of other reaction schemes, which corresponds to the formal character of the 'reactions' (4.2.3); the actual mechanism may be quite different.
'11
Chapter 4 - Multicomponent Balancing Consider for example chlorination of methane. The admitted reactions read CH 4 + C12 = CH3C1 + HC1 CH3C1 + C12 = CH2C12 + HC1 CH2C12 + C12 = CHC13 + HC1 CHC13 + C12 = CC14 + HC1
(1)
(2) (3) (4)
representing the four possible degrees of the chlorination. The corresponding stoichiometric matrix in its conventional form reads S1
CH4
g
S2
S3
-1 1
-1
C12
-1
-1
-1
HC1
1
1
1
CH3C1
S4
CH2C12 CHC13 CC14
Clearly, for instance the second reaction can be replaced by the scheme CH 4 + 2 C12 = CH2C12 + 2 HC1 corresponding to formal summation of reactions (1) and (2), or also to summation of columns Sl nd s2; the new vector (Sl+ s2) lies in the space generated by s~, ... ,s4 and conversely, s2 = (Sl + s2) - Sl hence (Sl+ s2) can replace s2 as basis vector. T h e set of c o m p o n e n t s C k that can (but g e n e r a l l y n e e d not) p a r t i c i p a t e in the a d m i s s i b l e r e a c t i o n s is a priori fixed by the g i v e n m i x t u r e , a l o n g with their (possibly only c o n v e n t i o n a l ) c h e m i c a l f o r m u l a e , thus also the s p e c i e s f o r m u l a m a s s e s M k are given. A c c o r d i n g to (C.20), let %k be the n u m b e r o f a t o m s o f e l e m e n t E h in C k . If there are H e l e m e n t s E h p r e s e n t in the f o r m u l a e C k then the H x K m a t r i x A o f e l e m e n t s (Zhk is the atom matrix of the set o f species C k , for arbitrarily g i v e n orders of the indices. For example the atom matrix for the components Ck in the reactions (1)-(4) above reads CH 4
CH3C1
CH2C12
CHC13
CC14
C
1
1
1
1
H
3
2
1
C1
1
2
3
4
C12
HC1
2
1
72
Material and Energy Balancing in the Process Industries
Observe that each of the three rows ~h of the matrix obeys ~hSr = 0 (r = 1, ..., 4) as corresponds to a correctly written stoichiometry. Thus, e.g. c~cls4 = (0 +) 3x(- 1) + 4xl + 2x(- 1) + 1x1 = 0 ; we have (3 + 2 =) 5 C1 on the LHS, (4 + 1 =) 5 C1 on the RHS of the reaction (4). The chemical elements remain conserved.
Let us remark in this context that the H numbers CZhk, thus the k-th column of matrix A does not generally determine the species C k uniquely; consider isomery, possibly stereoisomery. Certain columns of A can be linear combinations of other columns, or even be equal and a vector space generated by the columns makes no sense physically. The chemical species Ck have to be identified a priori. Now the (correctly written) reaction schemes (4.2.3) must obey the laws of chemical stoichiometry (conservation of the elements), hence necessarily r= 1,..-,R:
As~=0
(4.3.4)
where Sr is the r-th column vector introduced in (4.3.2). Thus each s~ belongs to the null space (kernel) KerA, thus also ~ c KerA. Denoting R0 = d i m ~
(4.3.5)
(dimension of space ~ we have R 0 < K - rankA
(4.3.6)
by the laws of linear algebra (as dimKerA = K - rankA). The dimension R0 is the 'number of degrees of freedom' for the composition changes in the node, thus the number of linearly independent reactions (columns of the stoichiometric matrix) that generate the reaction space ~. The number is restricted by the condition (4.3.6), hence the RHS is the maximum possible, given the atom matrix A; in the latter case, we have ~ = KerA. On the other hand we have R 0 = 0 for a node where no chemical reaction is admitted; imagine a mixture of hydrocarbons under atmospheric conditions. Generally, the reaction space ~ w i l l depend on the information we have on the reactivity of the components. Observe that also the equation An = 0
(4.3.7)
C h a p t e r 4 - Multicomponent Balancing
73
(conservation of chemical elements) is a consequence of (4.3.3) with the inclusion R c KerA, hence it brings no further constraint. More explicitly, the result (4.3.7) follows from the mole balance (4.3.2) with (4.3.4) and with arbitrary Wr. Recall that with the interpretation of n (4.3.1), if % is h-th row of A then % n (sum of O~hknk over k) represents the number of atoms of element E h in outputs minus inputs (since ~hknk is the corresponding number in the component Ck-balance). This number remains conserved for any element E h. For example in the chlorination of methane with inputs: pure C12 and CH4, the hydrogen balance 4(ncH4 )in = 4(nEll4 )out + 3(ncn3c0out + 2(ncn2cl_,)out + (ncncl 3)out + (nncl)out is a consequence of the balance (4.3.2) whatever be the reaction rates, thus whatever be neR.
The elimination of the reaction rates consists in finding a basis of the space R. Because the given vectors s~ (r = 1, ..-, R) generate R a basis can be found by column elimination in the stoichiometric matrix S = (s,,..., sR).
(4.3.8)
Using Gauss-Jordan column elimination, by linear combinations of the columns and with possible rearrangement of the rows (thus of the K indices k of species Ck ) we can transform S ~ (S0, OR_%)
(4.3.9)
where OR_R0 is K • (R-R o ) zero matrix, and where
s0/':o /
(4.3.10)
Here, IRo is R o • R o unit matrix and B is a (K-R o ) • R o matrix; the matrix B can have zero rows when some rows of matrix S are zero. The R o columns of S o , say (column vectors) s~o constitute a basis of R. Consequently, whatever be our n R we have
n
-
~o XrSr0
r=-I
thusn-S0x
(4.3.11)
where x (x~, .. 9, XR0)T uniquely corresponds to n as the column vector of its coordinates relative to the basis (s o , ... , s % o ) of R. We can partition the vector n as corresponds to the partition (4.3.10) of matrix S O in the vector equation (4.3.11)2 _
74
Material and Energy Balancing in the Process Industries
n / n'
n -
} R~ } K-R o
(4.3.12)
and we have immediately n o - IRoX - x, and n' = Bx thus
n' = Bn ~ .
(4.3.13)
The latter result is, by the construction, equivalent to the constraint (4.3.3). Consequently, the original information (with unknown reaction rates) is equivalent to the constraint
(-B,
IK_Ro) n
= 0
(4.3.14)
w h e r e IK_Ro is (K-R o ) • (K-R o ) unit matrix. We thus have eliminated the unknown reaction rates. Observe that if in particular R o = 0 (no reaction) then the set of columns of B is empty and the matrix in (4.3.14) is K • K unit matrix; hence the condition reads simply
R0 = 0 :
n = 0
(4.3.15)
in accord with (4.2.1) in the absence of reactions. Let us have a priori fixed some order of the K components Ck. With respect to this order of the components nk of vector n, the columns of the matrix (-B, IK_R0) are rearranged giving matrix (say) D. The matrix is (K-R o ) • K and of full row rank. The final form of the constraint thus reads Dn = 0
(4.3.16)
representing a system of (K-R o ) linearly independent scalar equations. In particular D is unit matrix if R 0 = 0. Recall (4.3.6), thus K-Ro > rankA. It is also easily shown that if a species Ck is nonreacting (thus absent in the reaction schemes, with zero row in the stoichiometric matrix), we obtain also nk = 0 quite formally by (4.3.16). Generally, the matrix D is not uniquely determined; it depends on the elimination procedure. But all such matrices have the same null space R = K e r D , thus the same space of solutions of (4.3.16). As simple example, let us consider a set of esterification reactions CH3COOH
+ R n O H = C H 3 C O O R n + H20
(n = 1, . . . , N)
where CH3COOH is acetic acid (say, A) and RnOH are aliphatic alcohols (say, A n ); thus R n are N different alkyl radicals, say CH 3 , C2H 5 , CH3-(CH 2 )n_2-CH2
Chapter 4 -
MulticomponentBalancing
75
(n > 2) for simplicity. Designate further E s n = C H 3 C O O R n and W = H 2 0 . The reactions (4.2.3) read -
A - A n + Es n + W = 0
with the stoichiometric matrix S n = m
~
1
2
.......
N
-1
-1
.......
-1
-1 -1 An
~
-1 1 Es n
1
W
9
1
.
.
.
.
.
.
.
1
whose columns are clearly linearly independent. Suppose we have also admitted some reactions CH3COOR n + RmOH = CH3COOR m + RnOH
(man)
thus Es m+ A n- Es n- A m-0
;
clearly, the corresponding column equals the difference: m-th column minus n-th column of matrix S , hence is eliminated. Thus the matrix (4.3.10) can be obtained in different manners. In our simple example, it is sufficient to re-order the rows. Denoting by I N the N • N unit matrix we have for instance
76
Material and Energy Balancing in the Process Industries
r
So
IN
'
}
" vector
Es n
1, 1 , . . . , 1
W
-1,-1, ... ,-1
A
n o
9vector n' -IN
An
with the corresponding partition (4.3.12) in the vector equation (4.3.11). Observe that R0 - N; K - 2 N + 2 is the number of components. In Eq.(4.3.14) with the partition (4.3.12) we have "
1,1,'",1
'
-1,-1, ... ,-1 B
m
-I N
and the equation reads, writing the components' symbols in lieu of the vector components c
-1,-1, ... ,-1
Es~ "~
1, 1 , . . . , 1
no
O m
IN+2
IN
Es N
W A A1 ll'
AN
Given an arbitrary a priori order of components, the columns of the matrix are rearranged to give matrix D in (4.3.16).
Chapter 4 - MulticomponentBalancing
77
One can readily verify that the rank of the atom matrix A equals 3, hence K - rankA - 2 N - 1 > R - N whatever be N > 1. The upper limit (4.3.6) is not attained.
4.4
ELEMENTBALANCES
It can happen that we have no information on possible reactions in the node. Then the only constraint we can specify is the conservation of atom species (elements) in the node. This is expressed by the condition (4.3.7); the condition is equivalent to defining the reaction space ~ as maximal, thus ~-
KerA
(4.4.1)
of dimension R 0 - K - rankA
(4.4.2)
We thus admit all chemical reactions that are possible in the node, among the a priori fixed components C k . We obtain immediately the constraint of the form (4.3.16). By elementary row operations, transform
A ~
Ao ) } rankA
(4.4.3)
0 Then D - Ao
(4.4.4)
is the (K-R o) x K full row rank matrix in the constraint (4.3.16). Let us assume that in addition, also certain relatively stable groups of elements remain conserved by the possible reactions; such cases are common in organic chemistry. We then simply regard the groups as 'atoms' and extend thus the atom matrix. The formal consequences will be drawn in the same manner as above. As an example, let us go back to the example in Section 4.3. We have found R 0 = N while K - rankA = 2 N - 1. So having no information on the reactivity, one would admit 2 N-1 independent reactions. The assumption admitting esterification reactions only, leads to reducing the reaction space to d i m ~ - N. The assumption can be also formulated in the manner that the groups R n and CH3COO remain conserved. Indeed, the 'atom matrix' then reads
78
Material and Energy Balancing in the Process Industries
A
An
I
Esn
I w
1
Rn 1
CH3COO
[H 0
1 1
1 1
1
....
1
1
1
....
1
2 ] eliminated
1
1
....
1
1
Subtracting the rows denoted by C H 3 C O O and O from row H yields row (0; 0, ..., 0; -1, .-., -1; 1) and adding the sum of r o w s R n yields row (0; 1, ..., 1; 0, .-., 0; 1) in place of row H, which equals the last row (O); hence row H is eliminated and the remaining rows are linearly independent. The matrix is of rank N+2 and we have K-(N+2) = N - R 0 . The new assumption is thus equivalent to that on the admissible reactions. Recall that the matrix obtained in this manner is matrix A 0 in (4.4.3) by formal analogy with the 'net' atom balance. The equivalence does not preclude different matrices D in (4.3.16). The net elemental (atom) balance is set up in particular when some of the reacting components are of not-well defined structure, and when only empirical formulae are known. Such cases occur in biochemistry. An example is the production of biomass (yeast); see Madron (1992), Example 2.2.
Remark
If D = A 0 then the constraint (4.3.16) is directly equivalent to n e KerA (= KerA0 ). As stated in Section 4.3, in the general case the constraint (4.3.16) is equivalent to n e % where ~ c KerA, as follows from (4.3.4). Hence the constraint (4.3.16) implies in any case the equality (4.3.7). We thus have, for h = 1, ..-, H (number of atom species) K Z O;hk n k - 0 ; k=l
multiplying the h-th equality by the atom mass (say) gh we obtain by summation K H Z (hE__llLthCthk) nk -- 0 k=l
H Z h t~hk = M k . w h e r e h=lg
Chapter 4 -
Multicomponent Balancing
79
Hence the equality K ]~ M k n k - 0 k=l
(4.4.5)
is a formal consequence of the constraint (4.3.16), whatever be n. If now the nk are interpreted by (4.3.1) and if also the condition (4.2.2) is obeyed then
O--
K
I
~,
~ y~ Ji = i~ Ji .
I
k=l i=1
1
Thus also the total mass conservation is a formal consequence of the constraint (4.3.16), with the condition (4.2.2).
4.5 R E A C T I O N INVARIANT BALANCES IN A S Y S T E M OF UNITS Let us again consider a system of units such as in Chapter 3. With (4.2.7) introduced into (4.3.1) we have, in the n-th node n k ( n ) --
-~'~ Cni i~J
y~ m i ]
M k
(4.5.1)
for any component C k . Let n(n) be the column vector of components n k (n) (k = 1, .-., K) and D(n) the matrix introduced in (4.3.16) for the n-th node, computed by the described procedure. Recall that D(n) = A 0 by (4.4.4) when only the element balance (4.3.7) is known in the node n; the case never occurs when the node is a splitter, because then necessarily D(n) is unit matrix (no reaction admitted). Let us adopt again the conventions and notation introduced before the equations (4.2.12a). Then the complete set of reaction invariant balances reads for n ~ Tu 9
D(n) n ( n ) = 0
(4.5.2a)
with (4.5.1), and for s ~ S again
~j
(4.5.2b)
Csj mj -- 0
with y~,~- y~, = 0
for j ~ J~
(k = 1,---, K) ;
(4.5.2c)
Material and Energy Balancing in the Process Industries
80
in addition we have again the conditions K
j e J:
Y, y~ - 1
(4.5.2d)
k=I
Recall also that according to the Remark to Section 4.4, by (4.4.5) we have K
n e Tu 9
Z
k=l
M k n k (n)
= 0
(4.5.3)
for any solution of Eqs. (4.5.2a). If also the conditions (4.5.2d) are fulfilled, any solution obeys the total mass conservation conditions. In the same manner as in Section 4.2, we generally introduce certain additional conditions such as (4.2.14), to obtain the whole set of constraints. The equations can be rewritten in different other manners. A simple modification consists in introducing the sets E k as in (4.2.14). Then the components nk (n) of vector n(n) read n e Tu 9
nk (n)
--
-
Z
ieEk
Cni y~ m i [ M k
(4.5.4)
in (4.5.2a). We can also introduce the coefficients j~
J" Bjk = 1 w h e n j ~ =0whenj~
Ek F_,k
(k-1,
--- , g)
(4.5.5)
thus the conditions (4.5.2d) read K
j ~ J"
kZ__?jk y~, = 1
(4.5.6)
along with the conditions (4.2.14) for the remaining y],. Given splitter node s S, the equations (4.5.2c) are written only for such k that j~ ~ Ek. Observe that the graph G of the system as introduced in Chapter 3 can be, for any k (thus component Ck ), restricted to the arcs Ek, giving subgraph Gk [N, Ek ]. The subgraphs Gk will not, however, generally have the properties required for graph G; they even need not be connected. In the equations, we can introduce the substitutions j ~ Ek 9
m~, = mj y~,
(mass flowrate of Ck in stream j) and
(k = 1 , - . . , K)
(4.5.7)
Chapter 4- Multicomponent Balancing
s ~ S, j e
Js"
81 (4.5.8)
%= mjs
(splitting ratios). Then the equations read ,"
N
1 n e
Tu 9
Z
D(n)
CnjmJk
- 0
(4.5.9a)
Mk jeER (k= 1, ..., K)
and for k - 1, ..-, K: for s e S such that Js e Ek m~- ffjm~ s = 0
( j e Js);
(4.5.9b)
finally for s ~ S 9j]~j~sj - 1 .
(4.5.9c)
Thus the vector equations (4.5.9a) are written for each n e T u (nodes that are not splitters). For the splitters s e S, we have the scalar equations (4.5.9 b and c). We take k = 1, .-., K and for each k, write the equations (4.5.9b) only for such s that Js e Ek (the split streams contain component Ck ); the equations (4.5.9b) are then written for each j e Js (streams obtained by splitting the input stream Js )Finally, for each s e S we have the equation (4.5.9c). The equations (4.5.9) are in variables m~, ( k - 1, ..., K; j e E k ), and o~j (J e Js where s e S), thus in all the component mass flowrates, and all the splitting ratios. We then have K
j ~ J"
mj = kZ=lBjk m],
(4.5.1 O)
and j ~ Ek 9
y~-
( k - 1, ..., K)
(4.5.11)
assuming mj r 0. The coefficients Bjk in (4.5.10) mean simply summation over such k that j ~ E k . The new set of equations is a consequence of the equations (4.5.2), with the restriction to nonnull component flowrates. Conversely having
82
Material and Energy Balancing in the Process Industries
any solution to Eqs.(4.5.9) and computing mj and y~, by (4.5.10 and 11), as is readily shown the latter variables' values obey all the equations (4.5.2), with the convention (4.5.5). So the new set of equations is equivalent to the original one, with the exception of'singular' solutions where some mj = 0. The equations (4.5.9 a and c) are linear in the new variables; only Eqs. (4.5.9b) are nonlinear. The equations (4.5.2a) with (4.5.1) are bilinear in the variables y~ and m i . The whole set of constraints generally does not determine a unique solution, but only what is called an (analytic) solution manifold, a (mathematically smooth, but 'curved') subset of the variables' space. Only if a 'sufficiently great' number of variables is measured and adjusted so as to make the system solvable, the remaining variables can be computed. We shall not attempt to analyze the problem in the same (mathematically rigorous) manner as in Chapter 3. An example in Section 5.5 will show that such problems may sometimes also be 'not well-posed'. For a different approach, see further Chapter 8.
Remark In this section, we have eliminated the integral reaction rates W~ from the equations (4.2.1), considering them a priori unknown. Let us now suppose that we have found a solution of the reaction invariant balances (4.5.2). We thus have determined the quantities nk (n) (4.5.1). Let us consider a reaction node n; going back to the notation (4.3.1), with (4.2.1) we have R
Z Vk~ W~ = n k
(k = 1, .-., K) .
(4.5.12)
r=l
Because n ~ R some solution in W~ exists. Clearly, it is uniquely determined if and only if the matrix (Vk~) is of full column rank R, which means R = R 0 (= d i m ~ ; otherwise there is an infinity of such solutions. This is the case of linearly independent reactions. If we then take arbitrary R linearly independent rows of the matrix, thus the corresponding R (= R 0 < K) equations (4.5.12), the integral reaction rates can be computed. So when desired, we have also obtained an information on how the reaction kinetics works in the reaction node. If the term W~ is further integrated over an interval of time (say, from t~ to t2 ), the integral is called the extent of the r-th reaction from initial t~ to time t2; the concept is useful rather and in particular for batch reactors.
Chapter 4 -
4.6
MulticomponentBalancing
83
E X A M P L E OF M U L T I C O M P O N E N T BALANCE A classical sulphuric acid plant can be schematized according to the
figure 12
8 r
]i
I0
4 13 15
14
Fig. 4-2. Sulphuric acid plant D ... air drying unit, B ... sulphur burning unit, R ... reactor, A1 ... oleum absorption unit, A2 ... acid absorption unit, S 123 ... splitters of streams 1-10 gas streams, 11 sulphur, 12 water, 13-18 acid streams
Atmospheric air (stream 1) is dried in D and as stream 2, is divided into stream 3 going to sulphur burning, and stream 4. Elemental suphur (11) is burnt in B and the combustion products (5) go into contact reactor R where sulphur dioxide is, by heterogeneous catalysis, converted to sulphur trioxide; dry air (4) is added. The gas after conversion (stream 6) is divided into streams 7 and 8 going into absorption units A1 and A2; also the gas from the first absorption unit (stream 9) is introduced into A2 and after the second absorption, the gas (stream 10) leaves the system and goes into the atmosphere. In absorption unit A2, sulphur trioxide is absorbed in circulating sulphuric acid solution; pure water is added as stream 12, and excess water contained in sulphuric acid of lower concentration comes also into A2 from the air drying unit as stream 13. Concentrated sulphuric acid solution produced in A2 (stream 14) is divided into stream 15 going back into the air drying unit, net production (stream 17), and stream 16. In absorption unit A1, sulphur trioxide is absorbed in 'oleum', a solution of SO 3 in sulphuric acid; the acid comes as stream 16, and stream 18 is oleum produced in the unit. The flow scheme of acids and water is simplified. The inventories are included in the environment node, as corresponds to our steady-state convention.
84
Mater&l and Energy Balancing in the Process Industries
The components Ck are C 1 C2
C3 C4
C5 C6
... ... ... ... ... ...
elemental suphur, formula S oxygen, 0 2 nitrogen, N 2 (by convention air is considered as mixture of water, H20 sulphur dioxide, SO2 sulphur trioxide, SO3.
0 2
and N2)
The composition of sulphuric acid solutions as well as that of oleum can be uniquely expressed in terms of (H20, SO3 ), due to instantaneous equilibria. See Section C.1, second paragraph; in particular the quantity of the component H2SO 4 is uniquely determined by those of water and sulphur trioxide. Then the sets Ek of streams containing component Ck are E1
=
E2 E3 E4 E5 E6
= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} = E2 = {1, 12, 13, 14, 15, 16, 17, 18} = {5,6,7,8,9,10} = {5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18}
{11}
(4.6.1)
as corresponds to simplifying balance assumptions adopted; for example sulphur burns completely in unit B, air is completely dried in D, no SO2 is absorbed. Observe immediately that for instance the subgraph G~ [N, E1 ] is not connected; all the nodes with the exception of node B are isolated in G~. The subset T u of production units is Tu =
{D, B, R, A1, A2}
(4.6.2)
and the subset of splitters is S = {S1, $2, $3 }.
(4.6.3)
We have Jsl = 2 and Js2 = 6 and Js3 = 14 and
Jsl = {3, 4} {7, 8} Js3 = { 15, 16, 17 } .
Js2 =
(4.6.4)
The reaction nodes are B and R, not perhaps A1 or A2, due to the elimination of a component like H2SO4 from the set of balance equations. In node
Chapter 4-
MulticomponentBalancing
85
B, we admit the oxidation reactions S 4- 02 - SO 2 S O 2 q- 1/2 02 = S03
, formally , formally
- C~ - C2 + C5 = 0 - 1/2 C2 - C5 + C 6
= 0 .
In node R, we have only the second reaction. In node B we thus have
S
r -1
0
C1
-1
-1/2
C2
0
0
C3
0
0
C4
1
-1
C5
0
1
C6
m
thus for instance multiplying the first column by (-1) and placing row we have C 1
0
0
1
So
\
"~
C 6 as
second
C1
C6
1
-1/2
C2
0
0
C3
0
0
C4
-1
-1
C5
B
from where the matrix (-B, IK_% ) = (-B, 14 ) as in (4.3.14), and finally, after rearrangement
D(B)
=
-1
1
0
0
0
1/2
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
(4.6.5)
operating on vector n(B) with the a priori order of components C~, ... ,C 6 . In node R we have only the second column of matrix S, so we can only place the last row as first, get So and (-B, 15 ), and finally, after rearrangement
86
Material and Energy Balancing in the Process Industries
1/2 D(R) =
15
(4.6.6)
\
as corresponds to vector n(R). Recall again that the matrices D are not unique; the reader can, however, verify that in both cases (B and R) the equation Dn = 0 corresponds to the conservation of the elements O and S, and to the nonreactivity or even absence of C 3 and C4 (and C~ in node R). We are now ready to write the equations (4.5.2). We have, by (4.5.4) with (4.6.1), for example c
yllmll
/ M~
( y 3 m 3 5- y2m5 ) / M 2 (y~m3 - Y~m5 ) / M 3 - n(B)
=
0 5
- ysm5 / M 5 ,
- y56m5 / M 6
,
Of course we shall have y~ - 1; formally, it will follow from (4.5.6). In the same manner are expressed (generated) the other vectors n(n) for n ~ T u , using the incidence properties of graph G and the list (4.6.1) in (4.5.4). By (4.5.2a) we thus have, with (4.6.2) for n = B,R :
D(n) (-n(n)) = 0
where we have (4.6.5 and 6), and for n = D, A1, A2 :
(4.6.7a)
-n(n) = 0
because the nodes are nonreaction, thus D ( n ) is unit matrix; observe that certain components nk (n) of n(n) equal zero identically, for example n~ (n) = 0 for any n~:B. The equations (4.5.2b) read, with (4.6.3) m 2 - m 3 - m 4 m 6
m14
-
=
m7 - m8 - m15
- m16
0
= 0 - m17
-" 0
(4.6.7b)
Chapter 4 - MulticomponentBalancing
87
and the equations (4.5.2c) are written, given s e S only for such k that the input stream j~ e E k thus the split streams Js c Ek; for the other components Ck we have y~s - y~ - 0. Thus, with (4.6.4) and (4.6.1) (s - S1)
y~ _ y2
and y4 _ y~
for k - 2, 3
(s : $2)
y~ = y6
and y~ - y6
for k = 2, 3, 5, 6
(s - $3)
y~5_ y~4, y~6_ y~4 and y~7_ y~4
for k = 4, 6 .
(4.6.7c)
Finally, the equations (4.5.2d) are generated according to (4.5.6), making use of (4.5.5) and the list (4.6.1). Thus for example Bjl = 1 for j = 11 only, the other Bj~ = 0, further Bj2 - 1 for j - 1, 2, ..., 10 while Bj2 = 0 for j = 11, 12, ..., 18, and so on. In this manner, the equations (4.5.2) contain as variables only those mass fractions y~, that can be nonnull by the a priori technological assumptions. Generating the equations (4.5.9) with (4.5.10 and 11) is quite analogous.
4.7
UNSTEADY-STATE BALANCES
Rigorously, an unsteady-state balance should take into account variable concentration profiles in units such as columns, or even in pipelines. Such a balance then, in fact, takes the form of a differential balance; cf. Appendix C. In some cases, the balance can be simplified; for example in a stirred reactor, we can approximate the k-th species' content (accumulation) as Ck V where V is (fixed) volume, Ck is (generally time-dependent) averaged (integral mean) volume concentration of species Ck. Then the unsteady-state balance is again an integral (volume-integrated) balance, extended by accumulation terms. Let us begin with the node balance (4.2.1). On adding the accumulation term, it takes the form dNk
dt
I
R
+ Z y~ Ji - Mk Z Vk~ W~
i=1
r=l
(4.7.1)
for species Ck (k = 1, ..., K). Here, t is time and Nk is mass of species Ck contained in the unit (node), thus for example in a reactor; the other symbols are the same as in Section 4.2. The balance (4.7.1) can be obtained from the exact balance (C.25) using the same simplifying hypotheses as in Section C.4, thus in (C.33), only the change in accumulation is no more neglected. It has the plausible form increase in acumulation plus output minus input = integral production rate.
Material and Energy Balancing in the Process Industries
88
Formally, the (accumulation) term Nk is defined as a volume integral. If Yk is mass fraction of Ck and p is total mass density then (4.7.2)
Ck = Yk 19
is mass of C k per unit volume, and integrating over the whole volume of the unit (say, reactor), we have Nk. Clearly, if the unit is for instance a distillation or absorption column, such formal integration is rather hypothetical. But for example in a stirred vessel, it is quite meaningful to write Nk = Ck V
(4.7.3)
where Ck is the (integral mean) volume concentration (4.7.2), and V is the volume occupied by the liquid; basically, both Ck and V can be time-dependent. In what follows, we shall make abstraction from how the Nkis actually computed. We now can add the term dN k / d t to the other balance equations in Section 4.2. Introducing again the convention (4.2.7), in place of (4.2.8) we have, for k = 1, .-., K R(n)
n e Nu 9
Z y~ Cni m
i -I-
ieJ
d N k (n)
M k Z Vk~(n) W~(n) r=l
(4.7.4) dt
where the argument (n) refers again to the n-th node. Using again the conditions (4.2.2) and (4.2.4), summation over k = 1, ..., K yields the total mass balance of node n n e Nu :
Z Cni mi = an
i~J
(4.7.5)
where a n is increase in accumulation per unit time in the node; see (3.1.1). If the formula (4.7.3) with (4.7.2) makes sense, we have
an _
( p V)n
(4.7.6)
dt where p is (integral mean) total mass density; the subscript n means n-th node. In any case, the total mass conservation is again a formal algebraic consequence of the balances (4.7.4). We can again decompose the set N u into S (splitters) and T u = Nu - S ('technological units'), and we adopt again the conventions (4.2.9 and 10). With the notation (4.2.11), in place of (4.2.12a) we now have
Chapter 4 - MulticomponentBalancing
for n 9 T u 9
89
Z y~ Cnj mj + r k(n) = jeJ
dN k (n)
(k = l, ..-, K ) . (4.7.7)
dt
The accumulation in the splitters will be clearly put equal to zero. Hence the balances (4.2.12 b and c) remain unaltered; also the conditions (4.2.12 d) subsist. We can again introduce the additional conditions (4.2.14). In Section 4.3, it is sufficient to re-define the terms nk (4.3.1). Considering, for the moment, a single-node component balance, let us put more generally
Z y~ Ji +
F/k --
i=1
(4.7.8)
dt
admitting thus the change in accumulation. Then, comparing the balance (4.2.1) with the more general balance (4.7.1), we conclude immediately that Eq. (4.3.2) and all what follows remains formally the same; only the column vector n is now of components n k defined by (4.7.8). In particular the constraint (4.3.16) holds true, now with the interpretation of n by (4.7.8). Also Section 4.4 remains formally unaltered. In the Remark, we have the result (4.4.5); from where again the total mass conservation, now in the form (4.7.5), as a formal algebraic consequence. In Section 4.5 we now put, in place of (4.5.1) 1 / -Z Cni y{ m i + rt k (rt) M k / - ieJ
d N k (n)
dt
(4.7.9)
in node n, for component Ck. Thus n(n) is the column vector of components nk (n) (k = 1, ..., K). D(n) is again the matrix introduced in (4.3.16) by the algebraic transformations of the stoichiometric matrix S (4.3.8). Consequently, the reaction-invariant balances are again of the form (4.5.2), with (4.5.3). We can again introduce the sets E k (of streams where component Ck can be present). Then the components of vector n(n) read dN k (n)
1 (n) - ---7 Mk
]~ Cni Y~ mi + ie Ek
(4.7.1.0)
dt
and with the conventions (4.5.5), we have again the conditions (4.5.6). Notice that the individual-component node balances are naturally written only for such components Ck that are present at least in one stream incident to the node. But formally, if some component Ck is absent in the node balance, we can put simply nk (n) = 0 because then also Nk (n) = 0.
90
Material and Energy Balancing in the Process Industries
Remark
Recall the Remark to Section 4.5. Considering again one fixed node (thus omitting the argument n), the equations (4.5.12) hold with the interpretation (4.7.8) of nk, due to (4.7.1). Let us consider in particular a batch reactor. After introducing the components into the reactor, say at time t = 0, the reactor is closed. We know the initial quantities (say) Nk0 of the components (some of them can equal zero). At times t > 0, we have Ji = 0 in (4.7.8), hence by (4.5.12) R E Vk~ W~ = r=l
1
dN k (k - 1, ..., K ) .
Mk
(4.7.11)
dt
Now at t = tl, let us have measured the quantities Nk - Nkl (say). Denoting t1
Er, = I W~ dt o
(r - 1, ..., R)
(4.7.12)
the conditions (4.7.11) require, for any k g ]~ Vkr Erl = r=l
1
(Nkl- Nk0)
(4.7.13)
Mk
At the same time, the condition (4.3.16) requires, by integration over the interval, D(N~ - N o) = 0
(4.7.14)
where N is vector of components N k / M k, N O at to , N~ at t~. Let us have adjusted (reconciled) the measured results so as to satisfy the condition (4.7.14). We then have K equations (4.7.13), which have some solution due to (4.7.14). I f the R reactions are independent, hence if the rank of the stoichiometric matrix (Vk~), thus S (4.3.8) is ranks = R
(4.7.15)
(full column rank) then there exist also some R linearly independent rows of the matrix, say rows k - 1, ..-, R for an appropriate arrangement. Thus the unique solution of the (sub)set of equations R
1
Z Vk~ E~, = r=l
(Nk~- Nko )
(k = 1, "" ,R)
determines the reaction extents Erl ( r t=t I .
(4.7.16)
Mk
1, 9. . , R) in the interval from t - 0 to
Chapter 4- Multicomponent Balancing
91
Formally, the extent of a reaction can always be introduced by an integral (4.7.12) and computed (in case of independent reactions) from a time-integrated balance (4.5.12) with (4.7.8). For a batch reactor, its value shows directly 'to what extent' the reaction has been realized with the initially present quantities Nk0. Recall, however, once more that the definition of the reaction extent, as well as that of the reaction rate, depends on how the reaction has been written; see the examples (r~) and (r~') in Section 4.1. Clearly, if the r-th reaction scheme is generally multiplied by some a > 0 thus V~,r = a Vk~ (k = 1, ... , K) then the reaction extent becomes E'~ - E~/a ; then Vk~E~ = Vk~E'~ . So the (invariant) item Vk~E~in (4.7.16) gives the production (consumption if negative) of species Ck due to the r-th reaction, in mole units. Let us further suppose that we have measured the Nk-values at different times, say Nk (t) at time t; thus Nk~ - Nk (t~). By (4.7.16), we obtain E~ (t) as functions of time. According to (4.7.12), by numeric or graphical differentiation we find W~ = dE~ / dt
(4.7.17)
as function of time. This is a way of identifying the (integral) reaction rates. In a stirred reactor, we then can assess w~ = W~/ V
(4.7.18)
per unit volume V.
4.8
MAIN RESULTS OF CHAPTER 4
In this chapter, 'multicomponent balancing' means the balancing of individual chemical species (components) present in a technological system. As in Chapter 3, the system consists of units (nodes) connected by oriented streams (arcs), constituting the oriented graph G[N,J]. A reaction node is such where chemical reactions are admitted; else the node is nonreaction. In each reaction node, we have to specify the admitted reaction stoichiometry; see Section 4.1. So if there are K chemical species Ck present in the node, the R admitted chemical reactions are formally expressed by the scheme (4.1.4) K E VkrC k : 0 k=l
(r - 1 --- R) ' '
(4.8.1)
with the convention Vk~> 0 for reaction products. Here, Vk~are the stoichiometric coefficients constituting the stoichiometric matrix (Vk~), denoted later by S. [By another convention, one calls 'stoichiometric matrix' the transpose sT.] For a
92
Material and Energy Balancing in the Process Industries
nonreacting species Ck , we put Vkr = 0 for r = 1, ... , R. Clearly, in any (nonnuclear) reaction the number of atoms of any chemical element must be conserved, hence if o~r~ is the number of atoms of element Eh (h - 1, ..., H) in the formula Ck we have K
E ~hkVkr -- 0
k=l
(h - 1, ... , H; r - 1 -.. '
'
R).
(4.8.1a)
We also suppose (which is always possible) that in the balances, the composition of a mixture is expressed by 'electroneutral' species (not perhaps by ions). Neglecting the change of accumulation in the nodes, the individual component balances of nodes n e N u (units of the system, without the environment node no) are of the form "output minus input = integral production rate" for any component Ck ; see Section 4.2. Here, the integral production rate of C k (in mass units) in node n equals, by (4.2.11)
rk(n ) = M k
R(n) ~-.,Vkr(n)Wr(n ) r=l
(4.8.2)
where Mk is formula (mole) mass of species Ck and Wr the r-th integral reaction rate (volume integral of the local reaction rate w~ in moles per unit volume per unit time); the symbols Vkr and R are as above, the argument (n) refers to the n-th node. For a nonreaction node, we set R(n) = 0 thus rk(n) = 0 for any k. Certain nodes can be splitters; see Fig. 4-1 in Section 4.2. If S is the subset of splitter nodes we have the partition Nu - Tu w S
(T u n S = O)
(4.8.3)
where T u is the remaining subset of 'technological units'. For any splitter node s ~ S, we have one input stream (j~) and the subset Js ( c J) of output streams incident to s; thus Js (4.2.9) is the set of arcs (streams) incident to s, with the condition (convention) (4.2.10) that two (possibly) adjacent splitters have been merged. For a splitter, the individual component balances are reduced to the total mass balance and to the condition (4,2.12.c) that the mass fractions of any Ck are equal for all the incident streams. Finally, we have the condition (4.2.12d): the sum of mass fractions y], of components Ck in any stream j equals unity. We thus have the complete set of balance equations (4.2.12). Let us introduce submatrices Cu and Cspli t of C (reduced incidence matrix of G) restricted to nodes (rows) n ~ T u and s ~ S, respectively. Let further R u be the I Tu I x K matrix of elements
Chapter 4 - Multicomponent Balancing
Ru,nk --
rk(n )
93
( n E T u , k = 1, ..., K)
(4.8.4)
and Y the I J[ x K matrix of elements
Yjk = y~,mj/ M R
(j ~ J, k = 1, .-., K)
(4.8.5)
where mj is the j-th mass flowrate; let m be the vector of components mj. Then the set of balance equations reads CuY + Ru = 0
(4.8.6a)
0
(4.8.6b)
Csplit m
-
with y~s_ y~,
= 0
(s e S, j e Js, k = 1, ..., K)
(4.8.6c)
- 0
(j ~ J)
(4.8.6d)
and K Z y~,- 1 k=I
The total mass balance C m = 0 is an algebraic consequence of the equations (4.8.6) and need not be written explicitly as a further constraint. In the equations, we formally admit the presence of any component CR in any stream j, but in fact we can have certain y~ = 0. Of course if some C k is absent in all the streams j incident to node n then it is also formally nonreacting in the node, hence Vk~(n) = 0 for r = 1, .-- , R(n). We can also formulate the a priori hypotheses (4.2.14): CR is absent in stream j if j ~ E k where E k ( c J) is the subset of streams where the presence of Ck is admitted. In balancing proper, the (integral) reaction rates W~ are certain parameters that can be eliminated; see Section 4.3. The procedure is purely algebraic, based on the assumed stoichiometric matrix S of elements Vk~ ,thus S(n) in reaction node n. By Gauss-Jordan column elimination (4.3.9), rearranging possibly the rows k of S we find matrix S O (4.3.10) of R 0 linearly independent columns
SO --
IR~ ]
B
Ro
} K-
R0
- (S0,
""'
S~
R0 )
(4.8.7)
94
Material and Energy Balancing in the Process Industries
where IR0 is unit matrix; algebraically, the columns Sr0 constitute a basis of the reaction space R o f dimension R 0 , generated originally by the columns of S and with the new order of components Ck. The component balances of the node, with unspecified parameters Wr , are equivalent to the assertion: n e R where n is K-vector of components (4.3.1) thus, in node n
nk(n ) = - jEeCnjYjk
(4.8.8)
where Cnj are elements of C and Yjk the elements (4.8.5). The assertion (n ~ is further equivalent to the equation (4.3.14). Rearranging finally the columns of the matrix (-B, IK-R0) according to some a priori chosen order of the components C k thus of the vector components (4.8.8) of n, we have (full row-rank) matrix D and Eq.(4.3.16) thus D(n)n(n) = 0
(4.8.9)
in node n with stoichiometrix matrix S(n) and reaction space 9~n) of dimension Ro(n ). Here, we can restrict the components of vector n(n) to certain K(n) components that are actually present in some of the incident streams and are thus subjected to the node n balancing; thus D(n) is (K(n)-Ro(n)) • K(n) matrix of full row rank K(n)-Ro(n). For a nonreacting species Ck we obtain, by (4.8.9), nk(n ) = 0. In a nonreaction node, D(n) is unit matrix thus n(n) = 0. Again, the total mass balance is an algebraic consequence of the above constraints. It can happen that we have no information on the possible reactions in the node; then the only constraint we can specify is the conservation of atomic species (elements); see Section 4.4. The constraint reads An = 0
(4.8.10)
where n is again the vector of components (4.8.8) and A the atom matrix (ahk); see (4.8.1a). By elementary row operations, we can transform A to the matrix (4.4.3) where A 0 is of full row rank, viz. that of A. The formally introduced reaction space Ris of dimension R0 = K - rankA (4.4.2) and we can put D = A 0 (4.4.4) thus D(n) = Ao(n)
(4.8.11)
in node n; we then have again the constraint (4.8.9). We can again restrict the vector n(n) to certain K(n) components actually present in some of the streams incident to node n. It is also possible to regard as 'chemical elements' certain groups of elements that, by hypothesis, remain conserved by chemical reactions
Chapter
4 -
MulticomponentBalancing
95
in the node, having thus extended the atom matrix; see the example in Section 4.4. Observe also that conversely, given a priori a reaction space R (stoichiometric matrix S), by (4.8.1a) the constraint (4.8.10) is an algebraic consequence of the constraint (4.8.9) and need not then be written explicitly. Writing the constraints (4.8.9) for any node n ~ T u (non-splitter) and adding the constraints (4.8.6b-d), we have the full set of constraints; see Section 4.5. We thus have the set of reaction invariant balances (4.5.2). 'Reaction invariant' means that the constraints are independent of the reaction rates; of course if certain quantities Wr in (4.8.2) were known a priori, one would have a 'stricter' set of constraints (4.8.6). The algebraic structure of the set of constraints is no more that simple as in the case of a single-component (mass) balance. The structure is generally the less transparent, the more available information has been incorporated. For example a splitter node s can also be simply regarded as a nonreaction node, to which the constraint (4.8.9) applies, with unit matrix D(s) thus n(s) = 0 without further restriction. But then, one woul_d formally admit different mass fractions of some C k in different streams j ~ Js as a possible solution, which is clearly absurd. Also the a priori hypothesis that some component is absent in certain streams complicates the structure, thus the solvability analysis as will be shown later in Chapter 8. We have introduced the sets E k for k - 1, ---, K where K is the number of all the chemical species considered in the whole system. Here, E k ( c J) is the subset of streams where the presence of component C k is admitted by the technology. See then the modifications (4.5.4) - (4.5.6), and the example in Section 4.6. The set of constraints can also be rewritten using the substitutions (4.5.7) and (4.5.8) where m~, - mjy~, is the mass flowrate of component C k in stream j (~ ER), and ~j the splitting ratio mi/mJ~ for stream j (~ Js) in splitter s (~ S). Due to the presence of splitters, the new set of constraints is again nonlinear in the new variables. The final goal is to formulate a minimal set of constraints thus, in a sense to be precised later, such that none is consequence of the other ones and still, all the available information has been incorporated. The set (4.5.2) is generally not minimal. For instance if s ~ S and j ~ J~ , the condition (4.5.2d) for this j follows from that written for Js and from (4.5.2c). It can also be shown that if, in the definition of D(n) in (4.8.9), we consider all the K components Ck (not only K(n) in node n) then D(n) is correctly of full row rank K-Ro(n ) where K > K(n), but the set of constraints (yielding automatically and correctly nk(n ) - 0 for any component Ck absent in the incident streams) is not minimal if K > K(n). The minimal set of constraints will be formulated and analyzed later in Chapter 8, Section 8.2. For the moment, let us only observe that the set of constraints such as in Example 4.6 admits of a final reduction to a minimal one. For example in the matrix D(B) (4.6.5), the fourth column ( C 4 - H20) and the third row (giving n 4 ( B ) - 0 by D(B)n(B) - 0) can be deleted since C4 is absent 9
96
Material and Energy Balancing in the Process Industries
in all the streams incident to node B by (4.6.1); also in the definition of vector n(B) that follows later in the section, the fourth component (n4(B) = 0) is thus deleted. We have neglected the change of accumulation in the nodes n e N u ; in particular nodes such as inventories have been included in the environment node n o. It is not formally difficult to extend the set of variables by the accumulation terms; see Section 4.7. In certain cases (such as stirred reactors), the accumulation terms can be identified by volume and concentrations measurement. In the extended balance, we then replace the definition (4.8.8) of nk(n) by (4.7.10) thus the components of vector n(n) are 1 nk(n ) = -
Z CnjYjk + jeE R Mk
dNk(n) (4.8.12) dt
with (4.8.5); here, because Yjk -- 0 for j ~ Ek, the summation is over j e E k only, and Nk(n) is the accumulation of component Ck in node n, t is time. Neglecting anyway the accumulation in splitters, we have again the constraints (4.5.2) where matrix D(n) is obtained by the same algebraic procedure as above, starting from the stoichiometric matrix S(n) (or from the atom matrix A(n)). In particular for batch reactors, we can also compute the reaction extents (time-integrated reaction rates) (4.7.12) by solving the equations (4.7.16); here, we assume that the reactions are independent (full column rank of the stoichiometric matrix S), and that the measured accumulations have been adjusted so as to obey the constraints (4.7.14).
4.9
R E C O M M E N D E D LITERATURE
The algebraic formalism of a set of chemical reactions in multicomponent balancing has been, in the last three decades, a matter of interest of numerous theoretical works. As a pioneering work, recall Aris (1965). See further papers by Whitwell and Dartt (1973), Schneider and Reklaitis (1975), Bj6mbom (1977 and 1981), and Waller and M~ikil~i (1981). On mass balancing around a chemical reactor, see also Murthy (1973 and 1974). A comprehensive introduction to chemical component (and energy) balancing can be found in Reklaitis and Schneider (1983). The algebraic formalism presented in this chapter is largely taken over from Madron and Veverka (1991). The solvability of the system of multicomponent balance equations in absence of chemical reactions was examined by graph methods in a paper by Kretsovalis and Mah (1987). Concerning the problems of solvability, see also the literature to Chapter 5.
Chapter 4- MulticomponentBalancing
97
Aris, R. (1965), Introduction to the Analysis of Chemical Reactors, Prentice-Hall, Englewood Cliffs, New Jersey Bj6mbom, P.H. (1977), The relation between the reaction mechanism and the stoichiometric behaviour of chemical reactions, AIChE J. 23, 285-288 Bj6mbom, P.H. (1981), Components in chemical stoichiometry, I&C Fundamentals 20, 161-164 Kretsovalis, A. and R.S.H. Mah (1987), Observability and redundancy classification in multicomponent process networks, AIChE J. 33, 70-82 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Madron, F. and V. Veverka (1991), Invariants of the chemical species balances of a reacting system, Chem. Eng. Sci. 46, 2633-2637 Murthy, A.K.S. (1973), A least-squares solution to mass balance around a chemical reactor, Ind. Eng. Chem. Process Des. Develop. 12, 246-248 Murthy, A.K.S. (1974), Material balance around a chemical reactor, Ind. Eng. Chem. Process Des. Develop. 13, 347-349 Reklaitis, G.V. and D.R. Schneider (1983), Introduction to Material and Energy Balancing, John Wiley & Sons, New York Schneider, R. and G.V. Reklaitis (1975), On material balances for chemically reacting systems, Chem. Eng. Sci. 30, 243-247 Waller, K. and P.M. M~.kil~i (1981), Chemical reaction invariants and variants and their use in reactor modeling, simulation and control, I&C Process Des. Develop. 20, 1-11 Whitwell, J.C. and R.S. Dartt (1973), Independent reactions in the presence of isomers, AIChE J. 19, 1114-1120
This Page Intentionally Left Blank
99
Chapter 5 ENERGY BALANCE Physically, an energy balance differs from the total mass and components mass balances in that it involves thermodynamics, namely its First Law. The unequivocal concept of mass is replaced by the intuitive concept of energy which, rigorously, is a quantity rather assumed theoretically than directly identifiable. This holds the more for the energy transformations, introduced as 'heat' and 'work' in traditional thermodynamics. The analysis in Appendix C shows that an energy balance set up in practice is never exact from the rigorous thermodynamic point of view, even from the traditional one. In chemical engineering balancing, a useful concept is that of enthalpy. A simplified energy balance is (not very precisely) called the enthalpy balance. This chapter deals mainly with steady-state enthalpy balancing. For the graph formalism, see Appendix A, Sections A.1 - A.3. The necessary concepts of linear algebra are summarized in Sections B.1 - B.8 of Appendix B.
5.1
ENTHALPY BALANCE
Let us begin with the energy balance of one node (unit). As in Chapter 4, we shall neglect a (possible) change in energy accumulation in the node; then the balance will be considered as the steady-state balance. Imagine the sulphur burning unit (node B) such as in Fig. 4-2 re-drawn in Fig. 5-1. (-?out
p5
| | | i
pll 3
~ |
p3
Fig. 5-1. Sulphur burning unit
,,
~5
1O0
Material and Energy Balancing in the Process Industries
The input streams are 3 (dry air) and 11 (liquid sulphur), the output stream is 5 (combustion products). The node includes a steam generator where the heat of combustion is transferred to boiling water. In an elementary textbook, the energy balance of the node would be set up perhaps as follows. The First Law of Thermodynamics requires Uin + Win-- Uou t --I- Wout --I- Q out
where U is internal energy (a thermodynamic state function), W is work, Q is heat; the items are balanced in a given interval of time and under steady-state operation (thus no accumulation term is present). If superscript j represents j-th stream then Uin-- U3 + U 11 , Uout = U 5.
Let us assume that the node includes also a pump, through which liquid sulphur is supplied; the corresponding work, say Ws is in fact negligible in the whole balance, but let us include the item formally. In addition, Win comprises the terms PJ~ (j = 3 and 11) where P is pressure and V is volume; it is the work due to introducing the streams (volumes V j) into the node. In the same manner, with j = 5 we have Wout. Consequently Wi n = p3 V3 + p ll Vii + Ws , Wout = pSv 5
and denoting Q =-Qout (heat supply, in our case negative) we have the approximate energy balance (U 5 + p5 V 5 )_ (U 3 + p3v3 ) _ (ull + pll vii) _- Q_ W where W - -Ws. Here, H = U + P V is enthalpy. With the convention Hj - H j for outlets, Hj = -H j for inlets we have the balance
Z. H j = Q - W J
where j = 3, 5, 11. It is a long way from this elementary reasoning to a rigorous energy balance as given in Appendix C. The reader not interested in the theory may accept the simplified form ('enthalpy balance') directly. It reads generally, in accord with (C.37)
Chapter 5 - Energy Balance I
^
101
.
Z H'J i - Q- W.
i=1
(5.1.1)
Here, Ji is again, as in Chapter 4, the i-th stream oriented mass flowrate (Ji > 0 for output streams), I is the number of streams i incident to the node. /~i is specific enthalpy of the i-th stream, averaged by (C.34). According to (C.36), W is interpreted as mechanical work per unit time, exerted by the node on the moving parts of its boundaries. A precise definition is only hypothetical; on the level of approximation adopted, let us regard (-W) as certain relevant work exerted on the node per unit time, for example by compressors and other important mechanical power consumers (grinding and the like). Finally Q is, by (C.41), heat supply through the walls, radiation heat included. Recall also the simplified energy balance (C.49) involving electrical energy supply Qe (C.48) to an electrochemical unit. Denoting Q' = Q
+ Oe-
W
(5.1.2)
the steady-state enthalpy balance will read I ]~/-tiff i - Q' i=1
(5.1.3)
In the same manner as in Chapter 4, let in particular the node be a splitter. See Fig. 4-1 and the text following after Eq.(4.2.5). According to the precise definition, the thermodynamic state must not change when the material passes through the splitter; specifically, we have the conditions /T - / 4 for i = 1,-.., I
(5.1.4)
where/-) is the specific enthalpy of the input stream. We have clearly Q' = 0 and with the total mass conservation (4.2.5) I Ji - o
i= 1
the enthalpy balance (5.1.3) is a consequence of (5.1.5) with (5.1.4). The enthalpy balance of a splitter will always be written in the form (5.1.4) and (5.1.5). Let us consider again a system of units such as in Chapter 3, thus the oriented graph G with incidence matrix (Cnj); we have again the equality (4.2.7). N is again the node set of the graph (environment node n o included), N u the set of units, J the set of arcs, thus of material streams. If Q(n) is the quantity Q'
102
Material and Energy Balancing in the Process Industries
supplied to node n, Eq.(5.1.3) reads fjCnj ffl Jmj + Q(n) = 0
n ~ T u"
(5.1.6)
where the equations are written only for T u - N u - S. See further the notation and conventions introduced in the paragraph before formula (4.2.11), in particular (4.2.9 and 10). We thus have for
s ~
S"
Z
C~j mj
= 0
j~J
with
/~J _/~ Js
= 0
for j ~ Js 9
(5.1.7)
Now the quantities Q(n) can also constitute a network. In the expression (5.1.2), the terms Qe and (-W) can be formally regarded as certain energy inputs from the environment, thus as certain oriented streams whose one endpoint is the environment node. If i denotes the corresponding arc, its orientation is determined by the coefficient (say) Dni where Dni = 1 for the inward orientation. If the quantity of energy is (say) qi > 0 then Dni qi > 0 means input (Dni = 1), Dniqi < 0 output (Dni = - 1 ) , thus for example (-W)(n) = Dni qi with Dni = 1 means mechanical energy supply (-W)(n) > 0; if it happens that conversely, some work is exerted by the unit on the environment (imagine a gas turbine) then Dni "- -1 and (-W)(n) = Dni qi < 0. The Q-portion of Q(n) in (5.1.2) can either come from the environment; we then introduce the same convention as above, with Q = Dni qi" It can be electrical or steam heating, or conversely steam production with Dni = -l. Or the Q-term may represent heat exchange between the node and another part of the system. It can be again in form of steam consumed/produced in the node and produced/consumed in another node, or due to heat transfer in a heat exchanger, whose the node is the cool/hot side. Then Q is a 'heat flow' term and can be represented by an arc with both endpoints somewhere in the system of nodes. Then again Q = Dni qi and if n' is the other endpoint in the graph, the same term occurs as Dn, i qi = -Dni qi in the node n' enthalpy balance. We thus can have generally several such streams incident to one node n, corresponding to a partition of the item Q(n) in the node n balance (5.1.6). Let E be the whole set of the 'net energy' streams constituting the Q(n)-terms as explained. Let us introduce the coefficients Dni obeying the convention
Chapter 5 - Energy Balance
103
n~ Tu i~E:
Oni ~
1
if arc i is oriented towards node n
Oni -- -1
if arc i is oriented outwardly from node n
Oni--
if arc i is nonincident with node n.
0
(5.1.8)
Then the enthalpy balances (5.1.6) read n ~ T~" ~ j f n j / Q J m j
+
i~jOniqi- 0
(5.1.9)
while for s ~ S we have again (5.1.7). Here, qi is the amount of energy transported per unit time by the net energy stream (arc) i ~ E. if the transport is in the direction of the oriented arc (5.1.8) then qi > 0. Some remarks have to be added. (i)
As net energy streams, one can also regard certain material streams that do not come into direct contact with the material subject to mass balancing, and only supply (or consume) energy. A common example is steam whose supply (or production) is expressed in energy units (say, watts). Of course only indirect, not perhaps direct steam heating is admitted in such cases ('direct' means mixed with some other material in the node). One then can imagine also certain 'net energy units' that only produce or consume energy. Although including such nodes in the set of units of the system would bring no serious complication, for the sake of simplicity we shall include such units in the environment node. Hence all nodes in the balances (5.1.9) and (5.1.7) are, by convention, incident with some material streams. In large process networks, it can happen that for instance steam produced (as energy) in one node is supplied to several other nodes via certain energy distributors. In that case, if D E is the set of the distributors we have in addition the balances
(5.~.1o)
d E D E 9 i~s
with the orientation convention (5.1.8) for n = d (ii)
~ D E.
A special unit is a heat exchanger. If not contained in a more complex unit balanced as a whole, it can be regarded as a node
Material and Energy Balancing in the Process Industries
104
j,
.~
~ j~
Fig. 5-2a. Heat exchanger
incident with oriented arcs Jl, "", J4" But some information would be lost, as the balance mj, - m h + m h - m j 4 - 0 would admit mjl ~ m h . W e thus divide the node according to the s ch eme
j,
,F
~- j2
i I I i i i
',i ! ! !
!
n
-~ j4
Fig. 5-2b. Partition of heat exchanger
having introduced a net energy stream i e E. Then the balances read mj,-m h-O
and m h - m h = O
which are the balances (3.1.2) for n - n' and n - n", and
(5.1.11)
Chapter 5 - Energy Balance mj,/QJ,
- mj2/QJ2 - qi- 0
105
} (5.1.12)
mj3/~ J3 _ m J4~ J4 ..1-qi - 0 which are the balances (5.1.9) for n - n', n". It can happen that in a mathematical model, the heat transfer term qi is further subject to an equation. If not, in balancing proper we can eliminate the unknown variable qi by simple summation of Eqs.(5.1.12), but the information (5.1.11) remains. Note that if the streams represent multicomponent mixtures then the detailed component balances read, by (4.5.2a) where D(n) is unit matrix (no reaction) n(n') = 0 and n(n") = 0
(5.1.13)
hence by (4.5.1), for example if n = n'
(y~, m j - y~2 mh ) - 0
thus by (5.1.11) also, as a consequence k - 1, ..-, K:
y J ' - y~:
(5.1.14)
assuming of course mj, ~ 0; the same for J3 and J4. Thus the whole information on inlet-outlet mass flowrates and composition equalities is contained in the system of energy and component balances (even if the variable qi has been eliminated). (iii)
Also can happen such cases that a stream produced in one unit (for instance some combustion products) is, from the technological standpoint, regarded as net energy stream coming into another unit:
106
Material and Energy Balancing in the Process Industries
J2
.!
1
v
1
Fig. 5-3a. Node with indirect heat transfer
We then again modify the scheme
I i | ! | i i ! ! !
i I
/'/
Fig. 5-3b. Partition of node with indirect heat transfer
having added the net energy stream qi; from the viewpoint of computation, it is again a parameter that can be eliminated. For the streams Jl and J2, we have again the equations (5.1.11)l and (5.1.14).
Chapter 5 - Energy Balance
107
(iv)
Recalling Appendix C, let us stress that the enthalpy data used in the balances (5.1.9 and 7) have to be thermodynamically consistent. The enthalpy data are represented by the specific enthalpies 171j of the streams. See Section C.3, where/~ stands for any/~J(j ~ J). Basic is the definition of standard enthalpies of all the components Ck present in the system; by a thermodynamic path, the components are then brought into the state they have in stream j, including possible phase transition and mixing. If a component does not participate in any of the reactions in the units, its standard enthalpy (enthalpy in the standard state) can be put equal to zero. Otherwise, the standard enthalpy has to be found in thermodynamical tables, or computed; see (C.20) or (C.23), or Veverka and Madron (1981) in more detail. In this manner, the specific enthalpy /~J is found as function of the thermodynamic state of stream j and the energy (enthalpy) balance equations become equations in the state variables. See also the example in Section 5.3. For another approach, see Section 5.4.
(v)
A brief note should be added concerning the neglected terms in the energy balance. Let us estimate the possible errors committed by neglecting the potential and kinetic energies of the streams. The potential energy can be computed with respect to a conventional zero assigned to the ground level of the system of units (plant). Consider a 50 m high distillation column. The potential energy at the top is some 500 J kg -1. If compared with a typical value of specific heat Cp - 2 kJ kg -~ K -~ for hydrocarbons, the neglected item corresponds to a systematic error 0.25 K in measuring or computing the temperature of the stream. If compared with a typical value 400 kJ kg -~ of the evaporation (condensation) heat withdrawn in the condenser, the error is 0.125 % , most likely smaller than the inaccuracy of available enthalpy data used in the column balance. The kinetic energy per unit mass is (1/2)v 2 where v is scalar velocity. Taking v as high as 20 m s-~ for a gas stream we have 200 J kg -~. With a typical value of Cp = 1 kJ kg -1 K -1 the neglected item corresponds to an error 0.2 K in temperature of the gas stream.
Of the same order of magnitude as potential energy for liquids is the work exerted by (liquid) pumps; imagine its expression in terms of total liquid head (equivalent height). Also power supply to pumps, though not perhaps negligible in the economic balance of the plant, is usually not detectable in the enthalpy (energy) balance set up around the units.
108
Material and Energy Balancing in the Process Industries
G R A P H AND M A T R I X R E P R E S E N T A T I O N OF THE E N T H A L P Y B A L A N C E
5.2
The matrix C of elements Cnj (n e N u , j e J ) is the reduced incidence matrix of graph G, with the environment node as reference node; see Chapter 3. Let us now admit the presence of energy distributors. Then the matrix D of elements Dni (n E T u t,.) D E , i e E) has, according to (5.1.8), the properties of reduced incidence matrix of a graph. Again, the arcs i that have only one endpoint in Tu o r D E will be considered incident to the environment node. Then the matrix D becomes the reduded incidence matrix of oriented graph (say) G E of nodes n e T u and d e D E, and arcs i e E. The graph need not be connected. Let us partition Du )
} rows (nodes) n ~ T
De )
} rows (nodes) d
D-
(5.2.1)
u ~
DE .
columns (arcs) i ~ E Let us further partition the set J of arcs (columns of matrix C) into those incident to some splitter node s ~ S, and theremaining arcs. The first subset is, by (4.2.9 and 10), disjoint union of subsets J~ (s ~ S), say m
J'
-
~
k_) Js s~ S
m
(Js' t'~ J s " -
O
f o r s' ~: s")
and the remaining subset being (say) Ju - J J = J. w J'
( J ' n Ju = Q).
(5.2.2) -
J' we have (5.2.3)
Then matrix C is decomposed
C -
Ca C'
o Ju
c"
/
}Tu
(5.2.4)
}s
J'
because Csj - 0 for s e S and j e Ju. Restricting graph G to arcs j e Ju determines a subgraph of G whose reduced incidence matrix is represented by the columns j e Ju; but then, clearly, C u is reduced incidence matrix of subgraph (say) G, [N - S, Ju] obtained by deleting arcs j e J' and nodes s e S in G, with environment as reference node added to nodes n e T u. As a plausible hypothesis, we can assume G, connected; then matrix C, is of full row rank.
Chapter 5 - Energy Balance
109
If Gu is not connected then at least one of the connected components does not contain the environment node and represents a subsystem connected with the remaining nodes only via certain arcs (streams)j ~ J' (5.2.2); recall that the whole graph G of material streams is connected. Thus all the input streams are outlet streams from some splitter, and all the output streams from the subsystem have some splitter as the other endpoint. Although such scheme is conceivable, it can be regarded as unlikely. In this chapter, the simplifying hypothesis (Gu connected) is irrelevant; but see later Chapter 8.
Let us now partition the column vector In of mass flowrates introduced in (3.1.6) as corresponds to the partition (5.2.3) mu ] m =
m'
}
Ju J'
(5.2.5)
Let us further introduce the vector h of components/~Jmj (j ~ J) and rearranging the vector components in the same order as in (5.2.5), partition
hu / }Ju h' } J'
h =
(5.2.6)
In the same manner, the corresponding vector h of components/)J is partitioned
A / u/,Ju h-
1]'
} J'.
(5.2.7)
The columns of the matrix C are arranged as corresponds to the components of the above column vectors. In particular the columns j e J' are arranged into groups j e Js (s e S) according to (5.2.2), and each J~ is further decomposed according to (4.2.9) into column Js (input) and columns Js (split output streams). Observe that matrix C" is thus partitioned Js o
C
l!
m
-0~ s
where as (s e S) are row vectors
s ~ S
(5.2.8)
110
Material and Energy Balancing in the Process Industries m
Js o:S -
(-1; 1, ..., 1 ) 9
w"-
Js
(5.2.9)
F
Js
and where the remaining elements of the s-th row equal zero, as corresponds to the s-th splitter mass balance _
- 0
Finally let q be the column vector of components q~ (i ~ E), arranged as the columns of matrix D (5.2.1). With these conventions, the whole set of enthalpy balance equations (5.1.9), (5.1.7), and (5.1.10) reads Cuh u + C ' h ' + Duq = 0
(5.2.1 la)
Deq - 0 = 0
and C"m"
(5.2.1 lb)
- 0
Here, the equation Sla' = 0 represents the e q u a t i o n s block-diagonal form
S-
(5.1.7)2.
Thus, in
(5.2.12)
Ss
m
where s ~ S and where matrix S s operates on columns j ~ Js, thus (-1
-1 SS
1
1 (5.2.13)
u
\
-1
1 v'-
Js
Js
Chapter
5 -
Energy Balance
111
is partitioned into column j~ and unit matrix. In order to write explicitly the information that the vector h (5.2.6) is of components/~Jmj, let us introduce the following notation. If v is an arbitrary column vector of (say) N components v~, ..., vN then designate diagv = diag(vl, ..., VN)
(5.2.14)
the N x N diagonal matrix with elements v~, ... , vN on the diagonal. Then, in (5.2.11) we have h u - (diagm u ) 1~u - (diagfiu) mu
(5.2.15)
and h' - (diagm') fi' - (diagll') m'
(5.2.16)
according to the partitions (5.2.5)-(5.2.7). The equation (5.2.1 lb) follows from the mass balance (3.1.6), hence is redundant if the set (5.2.11 a) is written along with the complete mass balance or with the more detailed multicomponent balance comprising the balances (4.2.12b) thus (4.5.2b). Let us finally recall Remarks (ii) and (iii) to Section 5.1. Having a couple of nodes representing a (partitioned) heat exchanger (Fig. 5-2), or also an arrangement such as in Fig. 5-3, we can eliminate the (unique) arc i ~ E connecting the two nodes by merging them. This corresponds to the summation of the two rows of matrix (Cu, C', Du), thus to the elimination of variable qi in (5.2.1 l a). Note that by the merging, the subgraph Gu is reduced to (say) G~, which remains connected if G u is. Then the matrix C~ obtained by the summation of rows is again of full row rank. [Of course in the mass balance, the nodes are not merged.]
5.3
E X A M P L E OF ENTHALPY BALANCE
Numerous simple examples of energy balances are given in Chapter 6. As an example of complex balance, consider again the sulphuric acid plant according to Fig. 4-2. Into the sulphur burning unit, elemental sulphur is conveyed in liquid form. The preceding operation is melting of sulphur, and liquid sulphur is stored; for simplicity and according to our steady-state convention, we include also this part of the plant in the environment node. So stream 11 in Fig. 4-2 is liquid sulphur. Now taking account of the energy transformations, the scheme will be completed by adding net energy streams and
112
Material and Energy Balancing in the Process Industries
certain nodes where only energy is transformed. The flow of heat into the ambient atmosphere due to imperfect insulation will be neglected. Concerning the mechanical energy transformation (power supply), we shall limit ourselves to the relevant items. The power supply to pumps in the acid circulation (units D, A1, A2) is not detectable in the enthalpy balance. Only the fan introducing atmospheric air into the drying unit (stream 1) rises the temperature of the air in a detectable manner. So let us cut stream 1
1
environment
l
.~
O
2
D
F
v
I
l.f I
!
I I
15
] net energy ' stream
13
I I
Fig. 5-4. Power supply f to fan F
where f ~ E and qf is power supplied to the fan. In the combustion unit B is included a boiler producing steam; by convention, the production is expressed in enegy units and the scheme is completed
!
!
Ib
11
.I
I i I I i |
~5
"1 Fig. 5-5. Steam production (stream b) in sulphur burning unit B
Chapter 5 - Energy Balance
1 13
on adding arc b e E, where qb represents the steam production. Finally in the acid units D, A1, A2 are included acid coolers where absorption heat is transferred to cooling water and further to the environment; we thus complete the scheme 12 8
Id
l al
I
I
1
1
!
1"
,~
D
2
7 . . . . . . . y
ti
r
A1
it
15 13
18 16
" a2
y
A2
10
11
13 14
Fig. 5-6. Heat withdrawn from drying unit D as stream d and from absorbers A 1 and A2 as streams al and a2 on adding streams d, a l, a2 where q~, qal, qa2 represent the corresponding net energy flowrates expressed again in energy units. The hot gas from the reactor going to absorption is cooled and heat is recovered. From the possibilities let us consider the following one. The dry air from unit D is divided into streams 3 (air for combustion) and 4; the cool stream 4 controls the temperature in the multistage reactor. The air in stream 3 can be pre-heated using the heat content of stream 6 to increase the steam production. So let us cut the streams 3 and 6 according to the scheme ,r to $2, instead of 6
from R
v
l
from S1 toB, ~, instead of 3 " Fig. 5-7a. Heat exchanger E
3
114
Material and Energy Balancing in the Process Industries
including heat exchanger E. According to Fig. 5-2b, E is partitioned
e
"1
E3
Fig. 5-7b. Partition of heat exchanger E
and net energy stream e is introduced, representing the transferred heat q~. Thus 3' stands now for 3 also in Fig. 5-5. The multicomponent balances of the nodes in Fig. 4-2 remain the same as in Section 4.6, substituting only stream 1' for stream 1 in D, 3' for 3 in B, and 6' for 6 in $2. In addition we have the balances of the new nodes F, E6, and E3. They are trivial; D(n) is unit matrix for n = F, E6, E3 thus in (4.6.7a) we have also n(n) = 0 for the latter nodes. The extension of the list (4.6.1) is easy, using the equality of composition in streams 1 and 1', 3 and 3', 6 and 6'. The modified partition of nodes now reads T u = {F, D, B, R, E3, E6, A1, A2}
(5.3.1)
and again
s = {s 1, s2, s3 }
(5.3.2)
while i s 1 - 2 and Jsl - {3, 4} Js2 = 6 ' and Js2 = { 7 , 8 } Js3 = 14 and Js3 = {15, 16, 17}.
(5.3.3)
According to (5.2.2), J' is union of sets {Jsh } and Jsh (h - 1, 2, 3), and by (5.2'3) Ju = {1, 1', 3', 5, 6, 9, 10, 11, 12, 13, 18}.
(5.3.4)
Then, in (5.2.4), C u is reduced incidence matrix of the modified mass flow graph restricted to arcs j ~ Ju. Matrix C' consists of elements Cnj where n ~ T~ and
Chapter 5 - Energy Balance
1 15
j ~ J' as set up above, Cnj being the elements of the modified incidence matrix. Finally matrix C" is of the form (5.2.8) where as~ = (-1; 1, 1) ~$2--(-1; 1, 1) C~s3 = (-1; 1, 1, 1)
(5.3.5)
as corresponds to the splitter mass balances (5.2.10) thus (4.6.7b), where only 6' stands now for 6. The set of net energy streams equals E = {f, e, b, d, a l, a2 }.
(5.3.6)
The set DE of energy distributors in (5.2.1) is empty. The matrix D u has nonnull elements in row F: D: B: R: E3: E6: AI: A2:
DFf = 1 DDO = -1 Dab = -1 none DE3,e = 1 DE6,e = -1 Dal,a 1 = -1 DAE,a2 = - 1 ;
(5.3.7)
the other elements are zeros. So the set of equations empty, and in the matrix S (5.2.12) we have
Deq
=
0 in (5.2.11a) is
234 Ssl
SS2
-1 1 0 / 3 -1
0
1
6'
7
8
4
-1 1 0 ] 7 -1
0
1
8
14151617 -1100 Ss3
-1
0
-1
00
15 1 0
16
1
17
(5.3.8)
116
Material and Energy Balancing in the Process Industries
specifying the equation Sfi' - 0 in (5.2.11a). We have thus specified the whole set of equations (5.2.11). Recall again that Eq.(5.2.11b) is a consequence of the multicomponent balance; it is comprised in the set (4.6.7b) where now 6' stands for 6. The whole task now consists in specifying the components of vectors h, and h' to be used in (5.2.15 and 16). The composition of the streams follows from the list (4.6.1) and from the equality of compositions in streams 1 and 1', 3 and 3', 6 and 6'. Nonreacting are the components C3 (N2) and C4 (H20) due to the elimination of possible component H2SO 4. Their standard enthalpies will be put equal to zero for gaseous N2 and liquid H20 at some 'normal' temperature TOand pressure P0. We shall immediately neglect the pressure dependence in all the specific enthalpies. The other components than C3 and C4 are reacting. Suppose we know the standard reaction heats, on the mole basis A' for reaction S A"
(5.3.9)'
+ 0 2 = SO 2
SO2 + 1/2 02 = SO3
(5.3.9)"
where S is in solid state, the other components in gaseous state. Indeed, the data are available in standard literature. Recall that the reactions are exothermic, thus A' < 0 and A" < 0. Let us recall Section C.3, formula (C.23). Writing the first reaction as SO2 - 02 = S the 'reaction heat' equals (-A'). For convenience, we take the components SO2 as 'basic' thus, by convention
0 2
and
m
i4r ~tJt
k
0
for k = 2, 3, 5 (gaseous state) (5.3.1.0)
and m
H4r176 = 0
(liquid state)
while H} ~ --A'
(solid state)
H6~~
(gaseous state) .
A"
}
(5.3.11)
m
Then the specific enthalpies are (1/M k ) Hkr176 In the gaseous streams 1, 1', 2, 3, 3', 4, 5, 6, 6', 7, 8, 9, 10, we shall neglect the heat of mixing; but recall that H20 is present as vapour. We thus make use of the formula [cf.(C.24)]
1 17
Chapter 5 - Energy Balance 6
1
121- Z Yk Cpk(T-To) + Y4/~4{~ + ~ k=2
M6
Y6A''
(5.3.12)
because Yl = 0 in all gaseous streams, and putting generally Yk -" 0 if Ck is absent. Here, Cpk is integral mean specific heat of gaseous Ck dependent on temperature T; L4~~ is evaporation heat per unit mass of water at (To,Po)./t is the quantity/~ in the j-th stream. In the stream 11 (liquid sulphur), we put
17111= -
1
A' + cpl(S)(Tml-To) + Lml + cpl(1)(Tll-Tml ) .
(5.3.13)
M1 Here, cpl(s) resp. r is (isobaric) specific heat of component C1 (sulphur) in solid resp. liquid state, Tm~ is melting temperature of C~, Lml is the corresponding heat of melting per unit mass. T j is generally temperature of j-th stream. In the stream 12 (liquid water) we have /_~12 __
Cp4(1)( T
'2-To)
(5.3.14)
where the argument (1) makes distinction from the notation in (5.3.12); (1) means again liquid phase. In the acid streams 13-18, the absorption and mixing heats are quite important. The streams are mixtures (H20, SO3) by our convention. Using thermodynamical tables, we can find directly the function h(T, y) representing specific enthalpy of the liquid solution at temperature T and y = Y6 (mass fraction of SO3). The function refers to zero levels
(5.3.15)
h(0, To)= h(1, To)= 0 ;
specific enthalpies of liquid H20 and SO 3 equal zero at To; for y ~ 0 we have h(T, y) < 0. Now the assumption (5.3.15) corresponds to our/44~~ - 0 by (5.3.10), but we must bring gaseous SO3 with enthalpy/46C~ into the liquid state. Thus in the acid streams ^
H - Y6
1
M6
A " - L(6~
h (T, Y6)
(5.3.16)
where L6~~ (> 0) is evaporation heat of liquid SO 3 at T0, per unit mass. If the reader is well-trained in chemical thermodynamics, he can find other ways for computing the function h(T, y) from otherwise given data.
118
Material and Energy Balancing in the Process Industries
The thermodynamically consistent conventional values of specific enthalpies /4J(j ~ J) constitute the components of vector h, partitioned according to (5.2.7) in Eqs.(5.2.1 l a). The set of balance equations is thus complete and expressed in variables mj, y~, and T j (temperature of stream j), with variables q~ in addition. Recall that the variable qe (see Fig. 5-7b) can be eliminated by summation of the node E3 and node E6 enthalpy balances in (5.2.11a)~, as DE3,e + DE6,e = 0 by (5.3.7).
Remark
Conceivable is (and was actually proposed) a technology of sulphuric acid manufacture under elevated pressure, where the steam boiler is replaced by a gas turbine. We thus have an example of positive work exerted by the system. The whole scheme is then different; in particular in Fig. 5-5 we can imagine stream b as mechanical power produced by the unit.
5.4
HEAT AND MASS BALANCING
We have chosen, in Section 5.3, a classical technology where available thermodynamic data allow us to compute the balance according to the general scheme (5.2.11). The formulation (5.2.11) of the enthalpy (approximate steady-state energy) balance is, however, not the only possible, and not always the most convenient one. In practice, one must frequently put up with a number of empirical data specific to the system and not found in thermodynamical tables. The data can even be more reliable than those found by a hypothetical thermodynamic path involving not precisely known items. For example the standard enthalpies of the components are, in fact, certain extrapolations computed backwards from reaction heats under realistic experimental conditions; for instance [see (5.3.9)] sulphur is certainly not burnt at, say, 273 K. Because the theoretical items are subtracted in the input - otput node balance, a relatively small error in the data may cause a significant relative error in the result. Let us go back to the node balance (5.1.9). The specific enthalpy/4 of a stream can be expressed in the form K FI-
f1(o) 5".yk.. k + h
k=l
(5.4.1)
where the term h is sum of increments due to bringing the components from the standard state into the actual state. We have
Chapter 5 - Energy Balance
Cnj/-tJmj jeJ Z
119
g
-- k=Z1P,k (~ jZj Cnj y~,mj + jZj Cnj hj mj K
^
= z CnjhJm -
j~.J
R(n) =
K
Z CnjhJmj - r=~_lWr(n)k~==~kr(n)Mkt?-l(k~ j~J I
by (4.2.12a) and (4.2.11). We have Mk/4~~ = "'k/4(0)(standard molar enthalpy of Ck), and (say) g
,.,.
(5.4.2)
Qr(n) = k~l Vkr (rt)Hk(~
is the (isobaric) standard heat of the r-th reaction in node n, on the mole basis; we have Q~ (n) < 0 for an exothermic reaction. The balance (5.1.9) thus reads
/2 • Wu
jE]~jCnj hJmj + /E]~EDniqi
R(n) = r=Z_lQr (n) Wr(n) .
(5.4.3)
The integral reaction rates W~ (n) can be computed, if the component balance equations have been solved for the quantities n k (n), provided the reactions are independent; see Remark to Section 4.5. Let R(n) = 1 for simplicity. Omitting the indices r and n, Eq.(4.5.12) reads
W
nk
...
Vk
whatever be k. Consider for example the reaction - S O 2 - 1/2 0 2 "tnode R of Example 4.6, thus Vso2 = -1 and by (4.5.1) with Fig. 4-2
SO 3
=0in
nso2 = N~s02-/~so2 because SO 2 is absent in stream 4 (air); N~o~ is molar flowrate of SO2 in stream i. If we know the gas flowrates and SO2-concentrations, we can already compute
W = N SO 5 2 -~N~o2 The example suggests that the RHS in (5.4.3) can sometimes be computed or estimated on the basis of a limited information.
120
Material and Energy Balancing in the Process Industries
The enthalpy terms hj in (5.4.3) can comprise heats of phase transition and, as in Example 5.3, also heats of mixing. As another example, consider the condensation of vapour (say) CI from a gaseous stream.
Fig. 5-8. Condenser C
Streams 1 and 2 are gaseous, stream 3 is the condensate, c is stream of heat transferred to the cooling medium. Chemical reactions do not take place, hence Eq.(5.4.3) reads hlml
- h2m2 - h3m3 -
qc
=
0
.
For j = 1 and 2 we approximate in the same manner as in (C.24) K
hj =
Z YJkC~k(TLTo) + yl L} ~
k=l
and for j = 3 h 3 = Cpl 3 (Z3_Zo) .
we take the standard states of aggregation gaseous, with the exception of liquid C~ with evaporation heat L~(~ Let further K
c~= kZ__lY{C~k
(5.4.4)
be, for any stream, assessed as a constant (or an integral mean specific heat of the mixture, only temperature-dependent), specific to the system under certain 'normal' operation conditions. Then the balance reads
Chapter 5 - Energy Balance 1
m 1Cp ( T ~ - T o )
2
121
2
- m 2 Cp (T -To)-
1 2 where m~ Yl- m2Yl
-
m3C3p( T 3 - T o ) - qc + (ml Yll-
m 2 Y ~ )f,l ~ - 0
m3 is the mass flowrate of the condensate.
Further examples are left to the reader as an exercise. In the end, we obtain the balance (5.4.3) in a form like n ~ T,: j Ej Cnj h~ mj + i~EDniqi + s(n)= 0
(5.4.5)
where Ft~ are certain assessed quantities specific to the streams j in the given technological system and dependent only on temperature; s(n) is a (positive or negative) 'heat source term' in node n, also specific to the system, dependent generally on composition and flowrates of the incident streams, assessed a priori or conversely computed from the balance. In particular if kt~ - Cp J (TLTo), with integral mean specific heat c~ of stream j, then/z~ is (so-called) sensible heat of stream j. For instance if stream j is vapour of component Ck then ft~ can comprise also the evaporation heat, and possibly the correction to elevated pressure; imagine high-pressure overheated steam. The enthalpy balance of the form (5.4.5) will be called heat balance of nodes n ~ T u , replacing Eq.(5.2.1 l a)l. Due to the presence of mass flowrates mJ, it will be written along with the mass balance. The whole set of equations will read, having rewritten Eq.(3.1.6) according to (5.2.4 and 5) Cum u + C ' m '
= 0
C"m'
= 0
Cuhsu+C'h s+ Duq+S=0 Deq Sh's
(5.4.6)
= 0 = 0.
Here, according to Eq.(5.4.5) we have introduced the column vector h~ of components hJsmj (j e J), partitioned
hs =
hsu h,s
} Ju } j,
(5.4.7)
and the column vector s of components s(n) (n ~ T u ); in addition 1]s is the column vector of components h~ (j ~ J), again partitioned
hs =
hsu
} Ju
1~,s
} j,
(5.4.8)
122
Material and Energy Balancing in the Process Industries
and we thus have, with the general notation (5.2.14) hsu = (diagm u ) l~u = (diagfi~u) m u
(5.4.9)
h'~ = (diagm') 11'~= (diagl~'~) m' .
(5.4.10)
Note that h~ is vector of material heat (most simply sensible heat) flowrates, 1~s the corresponding vector of heat content factors (per unit mass), by definition only temperature-dependent. The partitions (5.2.4), (5.2.5), (5.4.7), (5.4.8) correspond to the partition of the set N u of units into S (splitters) and T u (non-splitters, say 'material-treating units'), and to the corresponding partition of the set J of material streams into J' (incident to some splitter) and Ju (nonincident to any splitter). We further have the column vector q of components qi (i ~ E) representing nonmaterial energy flowrates in streams i; E is the set of the streams. Recall Remark (i) to Section 5.1 for the conventions. By definition, no stream i (~ E) is incident to any splitter; hence the streams can be incident only to the environment node, the nodes (units) n ~ T u, or also some node d ~ D E regarded as energy distributor. No material stream j (~ J) is incident to any energy distributor d (~ DE). The oriented graph of arcs i ~ E, and nodes n ~ T u and d e D E, denoted as GE, has reduced incidence matrix D; the environment node is again reference node. The node set of GE is partitioned into environment node, set T u, and DE; correspondingly are partitioned the rows of D according to (5.2.1). Finally S is the matrix (5.2.12) with (5.2.13). The last vector equation in (5.4.6) means again that for any splitter s (~ S), the thermodynamic state (thus temperature thus the heat content factor) of the input stream Js equals that of the split output streams j ~ Js ; recall the conventions (4.2.9 and 10). As an example, imagine a complex heat exchanger network where heat produced in some units is recovered by preheating colder streams; see for instance Section 6.3, Fig. 6-10. Recall that the variables qi that represent simple heat transfer flowrates can be eliminated. If n' and n" are the two endpoints of the arc i (~ E) representing the cold and hot sides of an exchanger according to Fig. 5-2b, by the summation of rows n' and n" in (5.4.6)3 o n e eliminates qi, as Dn'i qi -I- Dn,, i qi = 0 .
(5.4.11)
See the more detailed discussion in Remarks (ii) and (iii) to Section 5.1; imagine h~ instead of/T in (5.1.12).
123
Chapter
5 - Energy Balance
5.5
REMARKS ON SOLVABILITY
The complete set of balance equations comprises the component (chemical species) balances and the energy balance. In an analogous manner as in Section 3.3, having measured or otherwise fixed certain variables' values, the variables can be classified into measured and unmeasured; the latter are to be computed as unknowns in a system of equations. A finer classification as in Section 3.3 is, however, less obvious. Relatively simple is the system of equations (5.4.6). Under plausible assumptions, it can be shown that it has certain properties of 'regularity'; see later in Chapter 8. Having measured the values of certain variables thus having restricted the number of unknowns this regularity can get lost. Let us give a simple example. Let us have the system
a ~
5 :u3
b ~
t-7
6
r
F i g . 5-9. E x a m p l e
of balances m I + m 3 - m 5 = 0
mlh 1 + m3h 3 - msh 5 = 0
(a)
m 2 + m 4 - m 6 -
m2h 2 + m4h 4 - m6h 6 -
(b)
0
m 5 + m 6 - m 7 = 0
msh 5 + m6h 6 - m7h 7
0
= 0;
(r
here, hj stands for ~t~ in (5.4.6). Measuring hj thus means measuring the corresponding temperature. Let us have measured the values m 7 -- m +7
( , o)
and 9 +
hj = hj ,
j= 1,...,7.
124
Material and Energy Balancing in the Process Industries
If h~ r h~, h~ r h4, and h~ r h~ then m 5 and m 6 are uniquely determined by (c), then also m~ and m 3 by (a), and m2 and m 4 by (b), hence the unknown variables can be called 'observable'. Let, however, h~ = h~ and h ~ - h~. Then from (a) and (b) follows m 5 m 6 (h 2 -
-
0
) -
0
and assuming naturally m5 r 0 and m 6 :r 0, the equations are not solvable unless h~ - h~ and h~ - h~ (in which case they have an infinity of solutions). Let in addition h~ = h2, but let us have found h~ r h~. Clearly, the conditions are contradictory due to measurement errors. If we regard h~ and h~ as true values then the variables m5 and m 6 are uniquely determined by (c), but the remaining equations are not solvable. Generally, in a nonlinear system the solvability with respect to the unmeasured variables depends on the measured values and, as is frequently the case, the system is not solvable unless the measured values are adjusted by (nonlinear) reconciliation. In the above example however, a detailed analysis would show that the (iterative) reconciliation procedure would not converge for reasons of principle. Instead of speaking of observability/unobservability, one would rather say that the problem is not well-posed. See chapter 8 for more detailed discussion.
5.6
UNSTEADY ENERGY BALANCE
Recall the introducing paragraph to Section 4.7. Again, the use of unsteady energy balances is limited; we shall again consider only simple cases where the accumulation of energy in the node can be approximated in terms of averaged thermodynamic state variables. Recall now the introducing paragraphs to Section 5.1. The elementary reasoning leading to Eq.(5.1.1) can be modified, giving the balance dU Uin + Win "- Uout + Wout + Qout +
dt
where in addition U is internal energy accumulated in the node. The same consideration, including the terms P J V j in Win and Wout, leads to the balance dU
dt
+ZHj=Q-W j
Chapter
5 -
125
Energy Balance
where (with positive specific enthalpies) Hj > 0 for outlets, Q = -Qout, and W is work (per unit time) exerted by the node. Observe that the accumulation of energy is expressed by U (internal energy), not perhaps H (enthalpy). The general (simplified) energy balance can be obtained according to Appendix C from Eq.(C.26), where we neglect kinetic, potential (and electromagnetic) energy accumulated in the node. The other simplifying hypotheses are the same as in Sections C.4 and C.5. Hence in place of the balance (5.1.3) with (5.1.2) we finally have dU
I
,,.
+ Z/-/' S~ = Q'. dt i=1
(5.6.1)
Here, U is the integral over region N(the node)
U = ~ 9(YdV
(5.6.2)
N
where 9 is mass density and 0 specific internal energy. Clearly, the derivative
d U/dt can be, at most, only roughly approximated. We shall give two examples where such approximation is plausible. (a)
Imagine a reactor with fluidized bed of solid catalyzer; the reacting phase is gas phase. We can neglect the accumulation of energy in the reacting gas. The region N(the bed) is considered constant. We have 0 = / 4 - PV
(5.6.3)
where/-) is specific enthalpy, V specific volume, and P is pressure. We take P as a constant average value and V = 1/9 constant for the catalyzer bed. In the fluidized bed, temperature T can be considered spatially constant. Then, approximately dU
dt
~ pcpdV
dT dt
(5.6.4)
where Cp is (isobaric) specific heat of the catalyzer. Eq.(5.6.1) with (5.6.4) is the unsteady energy balance. (b)
Imagine a stirred homogeneous reactor, with liquid as the reacting phase. Region N is the liquid phase. We take again pressure P as constant. Then
126
Material and Energy Balancing in the Process Industries
(5.6.5)
U = H - PV
where
V - ~ dV
(5.6.6)
N is the volume of region N and H-
I 9/-)dV N
(5.6.7)
where/-) depends on temperature and composition of the liquid Let us now assume that the reactor is stirred in the manner that the liquid phase can be considered uniform. We then can make use of the classical definition of partial specific enthalpy of component C k OH
/)k-
~N k
(5.6.8)
where Nk is mass of species Ck in the mixture whose thermodynamic state is determined by the variables T, P, and the extensive variables N k (k = 1, ..., K). We further designate OH
C -
- Cp~ pdV N
OT
(5.6.9)
the heat capacity of the liquid mixture; its (isobaric) specific heat is Cp and the integral is total mass of the liquid, at given time t. With constant pressure we thus have dU
dT - C
dt
dt
K ^ dN k dV + E Hk -P ~ . k=l dt dt
(5.6.10)
The energy balance reads dT C ~ dt
K ,, dN k I + Z Hk + ]~/2/iJ k=l dt i=1
i -
Q'+ P
dV
.
(5.6.11)
dt
Recall that/)k is partial specific enthalpy of component C k in the uniform mixture, while H ~is specific enthalpy of i-th stream incident to the node. Q' is energy input by (5.1.2). ^
.
Chapter 5 - Energy Balance
127
The derivatives dNk/dt further obey the balances given in Section 4.7. The latter can be recast into reaction-invariant form, thus eliminating the (possibly unknown) reaction rates. On the other hand, if the reaction rates can be assessed then we can directly substitute, for dNk/dt, the terms of Eq.(4.7.1). Observe that in (5.6.11) we have, for stream i K
/T = Zly~/4~
(5.6.12)
k=
where/-]r~ is partial specific enthalpy of C k in the i-th stream. Hence the balance reads, as the reader readily verifies dT
C~
I K ,,. R K dV + ~ Z (H~: - Hk) yikJi + ~ ( Z Vk,:MkI?tk) W r - Q' + P . (5.6.13) dt i=1 k=l r=-I k=l dt
Here, if I is the unique outlet stream from the reactor, one can assume that its thermodynamic state will equal that of the uniform reacting mixture, at given instant t. Thus H~ =/4k for k = 1, ..., K, and the I-th summation term vanishes. Denoting K
r - 1, ..., R: Qr - kZ__lVk~Mk Hk
(5.6.14)
is (isobaric) heat of r-th reaction, at the thermodynamic state of the uniform mixture in the reactor. Putting m~ = -Ji for i < I (positive mass flowrates of inlet streams), the balance finally reads Qr
dT
dV
C ~ - Q' + P ~ dt dt
R
I-1
K
Z Q~W~ + Z Z (/t~-/-tk)Yk r=l i=1 k=l
mi .
(5.6.15)
Recall that Q~ < 0 for an exothermic reaction, by convention. The states of aggregation of the input streams are arbitrary, assuming thermodynamically consistent enthalpy values.
5.7
MAIN RESULTS OF CHAPTER 5
In practice, an energy balance is never thermodynamically rigorous; some less relevant terms are neglected, and other only approximated. Neglecting also the change of accumulation of energy in the nodes, such simplified energy balance is called enthalpy balance; see Section 5.1. As in Chapters 3 and 4, the
128
Material and Energy Balancing in the Process Industries
units (nodes) connected by material streams (arcs j ~ J) constitute the graph G[N,J] with environment node added to the set N u of units. The set N u is again partitioned according to (4.8.3) into splitters s ~ S and the other n ~ T u. In addition to the streams j ~ J, we consider net energy streams thus arcs i ~ E; they represent flow of energy expressed in energy units (say, watts) irrespective of whether (possibly) the energy is associated with mass of a heat transfer medium, not mixed with other streams. In addition to the nodes n ~ N u, we then generally consider in addition certain nodes d ~ D E regarded as energy distributors; they are incident only with arcs i ~ E. By convention, the arcs i ~ E are oriented; see (5.1.8) where we consider also n = d ~ D z. Then the whole set of constraints (enthalpy balance) is (5.1.9), (5.1.7), and (5.1.10);/4J is specific enthalpy of material stream j, qi is flow of energy in net energy stream i ~ E. Certain streams i ~ E can represent heat flow in a heat exchanger; see Remark (ii) to Section 5.1, or also Remark (iii) ibid. According to Figs. 5-2 and 5-3, the units where indirect heat transfer (through a dividing wall) takes place are formally divided into two parts, so as to take account of the separate mass (and chemical components) balances of each of them. However approximated, in principle the enthalpy data have to be thermodynamically consistent; see Remark (iv) to Section 5.1. In Remark (v) ibid., we give some numerical estimates of terms neglected in the complete energy balance (kinetic and potential energy); also mechanical energy supply to liquid pumps and agitators can usually be neglected in the total energy balance. The technological system extended by net energy streams and energy distributors can be represented by graphs G and GE; see Section 5.2. Here, the additional Gz is of node set N E = {no} u T, u D z
(5.7.1)
where n o is the environment node, and of arc set E; we have T u = No - S where nodes s e S (splitters) are not incident with any arc i e E. The reduced incidence matrix of Gz is D (5.2.1); its rows are partitioned giving submatrices D u (nodes n e Tu) and D e (nodes d e DE), where D E can be empty thus D e absent. The reduced incidence matrix of G [N, J], thus C is partitioned according to (5.2.4); here, the rows are partitioned according to the decomposition Nu = Tu u S, and the columns according to the decomposition J = Ju u J' where the arcs j e J' (5.2.2) are incident to some of the splitters, the arcs j e Ju are the remaining ones. Thus the nodes n e T u can be incident with arcs j e Ju (submatrix Cu), and also be adjacent to certain splitters via some arcs j e J' (submatrix C~. The nodes s e S are not incident with any arc j e Ju. Thus the submatrices Cu and Cspli t in (4.8.6 a and b) are partitioned
130
Material and Energy Balancing in the Process Industries
plus the equation C"m' = 0, which is the mass balance of the subset of splitters. The latter equation (included in the balance Cm = 0) is an algebraic consequence of the chemical component balances. If some heat transfer rate qi in an exchanger is not given a priori, it can be eliminated by merging the two endpoints of arc i (say n~' and ni" in T u ), thus by summation of the two rows (ni' and ni") in submatrix (Cu, C',Du ), which corresponds to the summation of the two scalar equations in (5.7.5)1. Of course in the components (mass) balance, the nodes are not merged. The constraints (5.7.5) require having a thermodynamically consistent database for the specific enthalpies/~J as functions of temperature, pressure, and composition (mass or mole fractions); the pressure dependence can often be neglected. The mass fractions Yk and mole fractions Xk of components Ck are interrelated (C. 12) Yk
xk =
K y~
thus
mk Z
1=1 M l
Mk Xk
(5.7.6)
Yk --
K
Z m~x~ l=l
in a K-component mixture; M k is formula (mole) mass of C k, The partial specific enthalpy/~ of Ck in stream j equals H~,/M k where H~, is partial molar enthalpy, and we have generally K
.
^
.
I?-P= Zly~, H~,
(5.7.7)
k=
where all/4~ (j e J) have to be thermodynamically consistent. The constraints (5.7.5) are written along with the constraints (4.5.2) thus (4.8.9) for n e T u , and (4.8.6b-d). See Sections 4.6 and 5.3 as an example. It is also possible to consider the constraints (4.8.6a-d) with explicitly written (integral) reaction rates W~ (n), and introduce the standard (isobaric) reaction heats Q~ (n) (5.4.2). If there are K(n) chemical species in the streams j incident to node n, we have K(n)
Or(n) =
k~__lVkr(n) "'k/4(0)
( r - 1, ..., R(n))
(5.7.8) m
with stoichometric coefficients Vkr(n ) and standard molar enthalpies --k14(o)ofspecies Ck; the standard heats can also be given directly for the reactions considered. Observe that Q~ (n) < 0 for an exothermic reaction. We then have the node balances (5.4.3) with (5.4.1) for n ~ T u. Thus, for any stream j, we introduce the quantity hj that represents the sum of increments due to bringing the components
Chapter 5 - Energy Balance
131
from their standard states into the actual state of the mixture in the stream, hence hj = Z y~ (/-)~ - "'k~r(~)
(5.7.9)
k
according to (5.7.7), with summation over components Ck present in stream j; (0) _ H(0)/Mk" [For example if the standard state of aggregation of all the "'k components is liquid, as well as in the mixture (and neglecting the pressure dependence and the enthalpy of mixing), we have hj - c~ (T j - T0) where TO is standard temperature, T j temperature of the stream, and c~ the (isobaric, integral mean) specific heat of the mixture.] We then partition the streams into Ju and J' and denote by hu resp. h' the vector of components hj for j e Ju resp. j e J', in lieu of lau resp. 11' in (5.7.3 resp.4). We further introduce the vector qR of components R(n)
qRn = - Z Or (n) W~(n) (n e T u)
(5.7.10)
r=l
(zero for a nonreaction node). Then along with the constraints (4.8.6) we have Cu (diagmu)flu + C' (diagm') fi' + Ouq + qR = 0 Deq Sh'
= 0
(5.7.11)
= 0
with 'source term' (vector) qR due to (standard) reaction heats. It can happen that our information is limited and the detailed chemical components balance not needed. Then only 'heat and mass' balances are set up; see Section 5.4. A typical example is a heat exchanger network. In the equations (5.7.11), the quantities h j (5.7.9) are approximated as functions of temperature only, say ~t~ (T j ) in stream j. Formally, we can consider in addition certain 'source terms' s(n) in some nodes n ~ T u , for example due to heats of reactions, a priori assessed or regarded as unknown parameters to be computed from the set of constraints (given measured values of mass flowrates and temperatures). For example in a heat exchanger network, kt~(T j ) - CpJ (TJ-To) is the sensible heat of stream j, with temperature T j , specific heat.c~, and reference temperature To. We introduce the vectors h~u of components hJ~,j ~ Ju, and h'~ of components hJ~ for j ~ J' (5.4.8), then the vectors hsu (5.4.9) of components h~ (j ~ Ju) and h's (5.4.10) of components h~ for j ~ J'; the quantity hJs.- mj hJs is the 'heat flowrate' in material stream j, with 'heat content factor' his . Finally s is the vector of components s(n), n ~ T u . Then the heat and mass balance is represented by the equations (5.4.6). Again, the heat transfer rates q~ through dividing walls can be eliminated by summation of the two scalar equations in (5.7.11)~, viz. the n'i-th
Material and Energy Balancing in the Process Industries
132
and n'i'-th where n] and n'~ are the two endpoints of arc i (~ E). Consider in particular a heat exchanger network without source terms (s = 0), without energy distributors (DE = O), and such that all the qi (i ~ E) represent heat transfer rates in exchangers (thus both endpoints of any i ~ E are in T u , not perhaps no). Let then, in (5.4.6), C~ resp. C'* be matrix obtained from Cu resp. C' by the summation of rows, separately over each couple {n], n'i'} of endpoints of arcs i ~ E. The balance then reads Cumu + C'm' = 0 C"m'
= 0
C~ hsu + C ' * h ;
- 0
(5.7.12) Sfis
- o
where the summation is not performed in the first two vector equations. The matrix C~ is of full row rank if (as assumed above) C a is. The minimal set of balance constraints (multicomponent chemical species balance and energy balance) will be formulated and analyzed in Chapter 8, Section 8.3; it is a set of independent scalar equations taking still account of all the available information. Solvability problems arise when certain variables' values are given a priori; see again Chapter 8. For the moment, let us only recall Section 5.5 as example of a complication. Formally, it is also possible to set up a balance taking into account the change in accumulation of energy in certain nodes; see Section 5.6. The general (but again simplified) form is (5.6.1). Here, the change in accumulation is represented by the term dU/dt where t is time and U the integral (5.6.2) of internal energy in the node. The possibilities of using such balance in practice are limited. The example of a stirred homogeneous reactor (5.6.5-15) is perhaps representative. [Note that in contrast to (5.7.8), Q~ (5.6.14) is reaction heat at the actual thermodynamic state of the mixture.]
5.8
RECOMMENDED LITERATURE
A rigorous thermodynamic formulation of the energy balance requires considering nonideal systems; see for example Holland (1977). For a complete integral balance, see then Veverka and Madron (1981). In a mathematically formal manner, the problems of solvability of mass and energy balance equations with given (measured) data were analyzed by Stanley and Mah (1981 a and b). Less formal but nore general is the analysis by Kretsovalis and Mah (1988); the authors consider multicomponent mass balance along with energy balance. See also Mah (1990).
Chapter 5
-
Energy Balance
133
Holland, C.D. (1977), Energy balances for systems involving nonideal solutions, Ind. Eng. Chem. Fundamentals 16, 143-168 Kretsovalis, A. and R.S.H. Mah (1988), Observability and redundancy classification in generalized process networks, I and II (Algorithms), Comput. Chem. Engng. 7, 671-703 Mah, R.S.H. (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Stanley, G.M. and R.S.H. Mah (1981a), Observability and redundancy in process data estimation, Chem. Eng. Sci. 36, 259-272 Stanley, G.M. and R.S.H. Mah (1981b), Observability and redundancy classification in process networks (Theorems and algorithms), Chem. Eng. Sci. 36, 1941-1954 Veverka, V. and F. Madron (1981), Differential and integral energy balances of complex chemically reacting systems, Chem. Eng. Sci. 36, 825-832
This Page Intentionally Left Blank
135
Chapter 6 ENTROPY AND EXERGY BALANCES This chapter deals with thermodynamic analysis of a technological process from the standpoint of exploitation of energy. It is included in the book only marginally, as another example of balancing a quantity associated with material flow. This quantity, called exergy, is intuitively interpreted as 'available (exploitable) energy', and its 'balance' is, in fact, an imbalance: due to the 2 "d Law of Thermodynamics, in any process some exergy is wasted (lost). The loss of exergy can be computed, and possibly compared for different alternatives of the process. The relation to the 2 no Law is explained in more detail in Appendix D.
6.1
EXERGY AND LOSS OF EXERGY
Let us have a technological unit (node) in steady-state operation, schematically W
F"
w-
materials streams
9
"1
0t
w, ~
boundaries of the node
Fig. 6-1. Node balance
The streams incident to the node are oriented according to Fig. 6-1. Thus oriented mass flowrate F i > 0 for inlets, F i < 0 for outlets, W' is mechanical power supply, and Q is heat supply per unit time; we consider the heat supply through the walls divided into several streams Qh. If compared with the notation in (5.1.1) we have F i - -Ji and W' = -W. Electromagnetic phenomena are not considered, hence the steady-state enthalpy balance reads
136
Material and Energy Balancing in the Process Industries
'~l/2/iFi + ~h Qh + W' - 0
(6.1.1)
where/2f is specific enthalpy of i-th stream. According to Appendix D, the 2 nd Law can be formally written as an 'entropy balance'
E S~F i + Z Q h + Qs = 0 i
h
(6.1.2)
Th
where S ~ i s specific entropy of i-th stream. The sum over indices h is an approximation for the integral in (D.11), where the whole heat transfer surface W has been divided into elements with temperatures Th. Observe that W is a fictitious surface of zero width. Considering an actual wall we have to decide where the surface W is traced, because there is a temperature difference between both sides of the wall. If we trace W near the outer side then Th is temperature of the outside medium. The equation (6.1.2) is, in fact, an operational definition of the entropy production term Qs (more precisely integral entropy production rate). Its continuum thermodynamic definition is by (D.10) where the entropy production density qs is determined by the irreversible processes in the node; for example if tracing the wall W at the outer side of the node then the entropy production due to heat conduction under temperature gradients in the wall region is included in Qs. The 2 nd Law claims that Qs > 0
(6.1.3)
for any technological (thus 'natural') process; the limit case Qs = 0 corresponds to an idealized ('infinitely slow') process under thermodynamic equilibrium. So far, all was pure (though simplified) contemporary thermodynamics. The following step goes back into the past century, into the time of Carnot cycles. We now choose a temperature To , that of the 'environment' regarded as an infinite heat reservoir (bath); say To = 273 K, or To = 298 K, according to the season. Multiplying Eq. (6.1.2) by To and subtracting from (6.1.1) we have
Z(/2P - T0~)F i + Z T~ )Qh + W' - ToQ s - O . i h ( 1 - --~-h
(6.1.4)
Here,
TIh = 1 -
r0
(6.1.5)
Chapter 6 - Entropy and Exergy Balances
137
is the traditional Camot efficiency: thus 'lqh Qhis 'mechanical work content' in the stream Qh of heat, i.e. the work (per unit time) that could be hypothetically gained by 'reversible transfer' of heat Qh from temperature Th to the temperature To of the environment (our infinite reservoir). Let us designate Eix = ( ~ - To ~i ) Fi
(6.1.6)
and call it the exergy(-flowrate) of the i -th (oriented) stream. If we imagine an idealized reversible (equilibrium) process then Qs = 0, and the balance (6.1.4) can be regarded as the balance of'available (exploitable) energy', from which Eix is attributed to the i-th material stream, mutually transformable with rib Qh ('exergy of heat flow') and W'. For any natural process, we have Qs > 0 and some exergy is lost (wasted). The term To Qs > 0
(6.1.7)
is thus the loss of exergy (per unit time) by the (steady-state) process in the node. Instead of 'available energy' (thus exergy) one says also briefly availability. In fact, there can be found subtly different meanings of the three terms, due to historical reasons; we can disregard them.
6.2
SIMPLE EXAMPLES
Clearly, computing the loss of exergy is equivalent to computing the term Qs. In addition the latter is, by (6.1.2), independent of the choice of TO. So let us give the expressions for Qs in certain simple types of industrial units. For the sake of simplicity, the terms of the balances are computed using approximate thermodynamic relations. Example 1. Steam generator
TQ"
.I 1 -
I
T4 2
-
b)
1
-
I
t 3 Fig. 6-2. Steam generator
138
Material and Energy Balancing in the Process Industries
According to scheme a), hot combustion products (1) are cooled by heat transfer (Q') and leave the unit as stream 2. We have Q = -Q' in Fig. 6-1. We trace the boundary W at the steam side of the generator, hence we can approximate T = Tb as the constant boiling point of water at given pressure. If m (= m~ = m2) is the gas mass flowrate and if the specific heat of the gas is approximated by a constant Cp, the balance (6.1.1) reads mCp (7"1- T2) = Q'
(6.2.1)
where Tj is temperature of stream j. Using the relation (D.4), we have the 'balance' (6.1.2)
Qs (a) -
O'
Tl
- mCp l n ~
(6.2.2)
where (a) refers to the scheme 6.2a, from where immediately the expressions for Qs in terms of 7'1 and T2 . In terms of T~ and Q' we have
Qs (a) -
Q'
7'1
- mCp In
Tb
-
Q'
Q'
+ mCp In
O
~
_
(6.2.3)
mCp T 1
Tb
T l-
mCp
According to scheme b), the steam side of the generator is included in the node and the streams 3 resp. 4 represent feed water resp. produced stream. We approximate the specific heat of liquid water also by a constant, Cpw, and let /_, be the evaporation heat at temperature Tb; we neglect the pressure dependence for liquid water enthalpy. Then, by (6.1.1) ^
(6.2.4)
mCp (T 1-T2) - m w (Cpw(Tb-T3) + L)
where mw is mass flowrate of water, thus also of produced steam. The specific entropy ~4 of steam is computed following a thermodynamic path from temperature T3 to Tb for liquid, then evaporation at Tb . The hypothetical path is reversible; thus at the boiling point, we have the equilibrium condition (~(vapour) - (~(liquid), with Gibbs function (D.6). We thus have
S(vapour) - S(liquid) -
L
(6.2.5) ^
quite generally, with evaporation heat L and boliling point Tb of any liquid.
6 - Entropy and Exergy Balances
Chapter
139
According to (D.5), we neglect also the pressure dependence of liquid water entropy. Then
~4
~3 _
-- Cpw
In ~
+
L
(6.2.6)
and the entropy balance (6.1.2) reads
L
Qs (b) - -mcp In ~
+ mw (Cpw In ~
+
L Tb
).
(6.2.7)
The enthalpy balance of the steam side reads mw (Cpw (Tb-T3) + L) = Q ' .
(6.2.8)
So if feed water is introduced at temperature Tb , by T3 = Tb we have Q' - mw L and Qs (b) - Qs (a). Let thus T3 = Tb for simplicity. According to (6.2.2) and (6.2.1), putting Qs - Qs (a) - Qs (b) we have
(say) ~ =
To Qs
Q'
-
To
rb
-
To
T, ln~.
T,-T2
(6.2.9)
T2
Here, Q' means simply steam production in energy units and the whole expression represents loss of exergy per unit steam production. With constant T0, is function of Tb , T 1 and T2 . Clearly, e decreases with increasing Tb , thus with increasing pressure of the produced steam (given 7'1 > T2 , with the condition Tb < T2 so as to make the process thermodynamically possible). The conclusion is quite plausible: with higher Tb, the energy is obtained in a 'nobler' form. We can also examine the dependence on 7"1 and T2. Denoting f = e/T o we find /)f
1 -
~T,
T,(T,-T 2)
Of
1 -
~T2
q~(x) where x =
Tz(T,-T2)
T2
lnx
7"1 ~(y) where y =
T~
-1>0
< 1 and q~(x)x-1
lny > 1 and ~ ( y ) -
T2
hence the derivatives are positive and we have also
>0
1y-1
140
Material and Energy Balancing in the Process Industries
3e
38 > 0 and
OT l
> 0.
(6.2.10)
OT2
For example with the following values T0 = 2 7 3 K
T1 = 1 2 0 0 K
Tb = 400 K
T2 = 450 K
we have = 0.325 . Replacing T~ by T ] -
1400 K we obtain
e' = 0.356 ; leaving T 1 - 1200 K but setting T~ = 500 K in place of T2 we have e" = 0.341. The formal result (6.2.10) can be physically interpreted as increased irreversibility: on the average, increasing T1 or T2 heat flows from even higher temperatures to the final Tb . Still, what kind of inference can be drawn herefrom is left to further speculations. For instance increasing the combustion temperature 7'1 can mean smaller excess of oxygen in the combustion chamber; it is not immediately clear why more 'exploitable energy' is thus wasted in the generator per unit steam production. See the next example, after formula (6.2.12).
Example 2. Imperfectly insulated pipeline We usually neglect the heat loss terms in the balances. This example is an exception.
IQ"
! ! 1
.
!
.
.
! .
! !
.
I" !
2 i
~) Fig. 6-3. I m p e r f e c t l y i n s u l a t e d p i p e l i n e
1
. . . . .
TQ" !
,.-~ I'
'
i
!
,
b)
,.-2
Chapter 6 - Entropy and Exergy Balances
141
We consider a segment of pipeline as drawn in Fig. 6-3. According to scheme a), the boundaries consist of two cross-sections (stream 1 in, stream 2 out), and of the outer side of the wall (possible insulation included). With Q' = -Q (heat flow into the atmosphere), the balance (6.1.1) is again of the form (6.2.1); m (= m~ = m 2 ) is mass flowrate of the fluid, Cp is specific heat, Tj is absolute temperature at cross section j. Let T' be the outer wall temperature; if the difference 7"1-7"2 is not too great, we can consider T' as a constant average value. We then have the entropy production Qs(a) again by formula (6.2.2), with T' in place of Tb. According to scheme b), the boundary is placed near the wall, but at some distance where the temperature is approximately equal to the atmospheric temperature To . Although the heat flow is mainly due to convection by turbulence, we do not consider any net mass flow across the boundary traced in the atmosphere. Hence the balances are of the same form as in case a), only T' is replaced by To . We thus have, in case b)
Qs ( b ) - Qs (a) + Q'
1
1
To
T'
(
(6..2.11)
The last term represents entropy production by heat flow between temperatures T' and To . Clearly, it is the expression
To Qs (b) = Q' - mcpT o In
(6.2.12)
that can be regarded as the actual loss of exergy, because the heat at temperature T' is not utilized, thus also lost. The example itself is rather trivial. Still, imagine for example combustion gas from a steam generator (stream 2 in Fig. 6-2). Suppose that the stream goes into the atmosphere. It is difficult to compute the entropy production by mixing the stream with the atmosphere. Nevertheless, some (basically exploitable) energy is irreversibly lost. The loss can be estimated by the following trick. In a thought-experiment (quite in the style of traditional thermodynamics), let the gas be led through a tube with outer temperature To; if the tube is of infinite length, the final temperature will be also To , that of the environment. We then can use formula (6.2.12) where our T2 (temperature of stream 2 in Fig. 6-2) is substituted for T~, and To for T2 . In place of Q', we now set mCp (T2-T o). Then, if Qs is the entropy production,
To Qs - mcp (T2- T o ) - mCp T o In
To
(6.2.13)
142
Material and Energy Balancing in the Process Industries
By the way, in the same style, let us compute the work (per unit time) exerted by an infinite series of 'infinitesimal reversible Camot cycles' transferring infinitesimal heats dQ - -mCp dT from T to TO, with Carnot efficiency (1 - To~T). We obtain
~2(1 - To
To
,
(6.2.14)
--T- ) mCp dT = T o Qs
This hypothetical work is lost, since the latter experiment (with Carnot cycles) has not been realized. It should be noted that Qs is not the actual entropy production (the latter would also include terms due to diffusion of the gas components etc.), and TOQs cannot be generally put equal to the lost 'exergy of the exit gas', thus to m (/)2-T0 ~2) by (6.1.6). The latter value will depend on the zero levels adopted for enthalpy and entropy in the whole set of production units; for instance in the combustion chamber, one will take zero levels rather for chemical elements such as C (carbon), thus the final CO2 will be assigned negative enthalpy value at its standard state. It is not always this easy to set up the whole 'exergy balance' of a plant, and the less to draw inference from it. Generally, we can compute the entropy production (or loss of exergy) in individual nodes, but the final judgement will depend on how the node is included in the technological system. See also Sections 6.3 and 6.4. Example 3. Heat exchanger
r/'l m
I.
y ! !
1
I ! !
T2 Ff
m
r,
T">T"
Q>O F
T~
2
Fig. 6-4. Heat exchanger
We consider a countercurrent heat exchanger. The hot stream, of mass flowrate m", is cooled from temperature T2" to Tl"; by the transferred heat Q the cold stream, of mass flowrate m', is heated from T~' to T2'. Hence m"cp" (T 2''- T';) = Q = m'c o' (T 2 - T'~ )
(6.2.15)
Chapter 6 - Entropy and Exergy Balances
143
with specific heat %. Consequently
a t!
T2 -
T2 -
t!
m"Cp
+ T~ (6.2.16)
O m' c'p
+ T~
and denoting A - T'~- T; (> 0)
(6.2.17)
we have 1
T ~ - T~ - Q m
tt
1 tt
Cp
m
~
Cp
+A
;
(6.2.18)
let us assume m' Cp' _>m"Cp", thus A is the smallest temperature difference between the streams. The entropy balance will be written for the whole exchanger, with the heat transfer surface inside. Thus, using again (D.4) with constant Cp, we have ~2_~1 = Cpln(T2 / T 1 ) and the balance reads
Qs = m'Cp' In
T2
T ',
- m"Cp In
T2
(6.2.19)
T ';
as corresponds to the orientation of the streams. With the above equalities, we have
Qs = m' cp' In 1 +
Q ) -m"c~ In
m'c' T;
O
1 +
m"Cp (T' l + A)
(6.2.20)
Given the specific heats and flowrates, Qs is expressed as function of Q, A, and
T'l. If Q = 0 then clearly Qs = 0. We have 3Qs
T ~ - T~
bQ
T 2 T~
(6.2.21)
as the reader readily verifies. Hence so long as T~ > T2 we have Qs > 0 whenever Q > 0. In the limit case with m'C'p = m"c'~ and A = 0 we have T' - T" in the whole exchanger, thus Qs = 0; hypothetically, we can still admit Q > 0 in
144
Material and Energy Balancing in the Process Industries
(6.2.15), which corresponds to a reversible heat transfer under vanishing temperature difference between both streams (thus with infinite area of the heat transfer surface). We further find, at constant Q and T'~ ~)Qs
~A
-
Q
(6.2.22)
T'; T 2
positive whenever Q > 0. Thus Qs is minimum if A - 0 thus T'l = T'; ; assuming m' Cp' > m"c~ we have still T i,2 > T2, and Qs > 0; the process is no more reversible but given TI' and Q, the minimum entropy production (or loss of exergy) will be again attained in the limit at the expense of an infinite surface for heat transfer. It is also easy to verify that increasing m'C'p in (6.2.20) makes Qs increase. Observe that with given A this means increasing the other temperature difference (6.2.18); the average driving force for heat transfer increases, and so does the entropy production. Finally the reader can verify that, at constant Q and A 3Qs
Q
1-
m
aT]
T'~ T~
T'; T2") r', T;
< 0
(6.2.23)
whenever Q > 0 and T" > T' in the exchanger. Using (6.2.15) in (6.2.10) we have
T~ Q
= . To . . In . 1 + T'2-T1' ) - . To . . . In T'1 T2-Tl T2-T l
1 + T'~-T'~ T'I+A
.
(6.2.24)
With given temperature differences and transferred heat Q, the loss of exergy increases with decreasing inlet temperature T'~ of the cold stream. The conclusion is, however, more difficult to interpret in terms of lost exploitable energy. Nevertheless, if the reader likes thought-experiments with Carnot cycles, he can imagine the following one. Let infinitesimal quantity of heat dQ be transferred from temperature T" to T'. If dQ were transferred from 7" to TO by a reversible Carnot cycle, the work thus gained would be
dW"-(1- T~ ) d Q . T' But we have transferred our dQ from T" to T' irreversibly. What remains is still the hypothetical gain of work
145
Chapter 6 - Entropy and Exergy Balances
To
dW'-(l
The difference 1
T"-T'
1
dW"- dW' = TO T'
d Q - TO
T"
dQ T'T"
is the lost work. Clearly, with the difference 7"'-T' fixed the lost work decreases with increasing T', in accord with our statement above. Observe that if the difference tends to zero then the lost work is inversely proportional to the square of the absolute temperature. See Remarks at the end of this section. In Fig. 6-4, let us imagine a narrow segment of the countercurrent heat exchanger, with temperatures T' and T" and transferred heat dQ. In the same manner as in (6.2.15) we find the 'infinitesimal balances' dQ - m"c'~ dT" = m'Cp' dT'
and by integration from cross-section 1 to cross-section 2 we obtain the integral of (dW" - dW')
To
'2 dT' ~ Cp T~
m' '
'
T'
T~ dT")
- m"c"
P
~
T~"
T"
- To Qs
where Qs is the entropy production (6.2.19). Thus the integral of the 'lost work' equals just the loss of exergy TOQs. If nothing else, the result is remarkable theoretically: thermodynamics works. Another question is, however, what kind of energy has been actually wasted in TOQs at low temperature levels (where TOQs is relatively greater). There can be no actual use of this 'low-potential heat' in a real plant. See Section 6.3, Subsection 6.3.1.
Example 4. Pressure reduction by throttling
PI y
v
2 Fig. 6-5. Pressure reduction
P1 ~ P2
146
Material and Energy Balancing in the Process Industries
The pressure of gaseous stream, of mass flowrate m, is reduced from P~ to P2. The enthalpy balance implies /~2 _ / ~
(6.2.25)
for specific enthalpies, and Qs = m( ~2-~' ) 9
(6.2.26)
Generally, knowing the (/~, S) dependence with parameter P (pressure), the difference in (6.2.26) can be found at given/-) as S(/4, P2) - S(/), P~ ). Note that d/~/- 0 implies, in the (T, P) coordinates dT+
dP- 0
,9T
,9P
hence with (C.21 and 22) f'-T~ dT = -
af, /gT
dP
(6.2.27)
Cp
at constant/4. Thus, by (D.4 and 5)
dS= Cp dT - c)l~"dP T
,9T
equals ^
dS = -
V
dP.
(6.2.28)
T Hence ~2 > ~1 as P2 < P~, thus Qs > 0 by (6.2.26) and given the initial state at cross-section 1, Qs increases with decreasing P2. The conclusion is in agreement with the intuition: some exploitable work (power) is lost by the throttling. An estimate can be found as follows. From the equation of state PV-
zgmT
(6.2.29)
with gas constant R m per unit mass and compressibility factor z, we obtain
C h a p t e r 6 - Entropy and Exergy Balances
147
dP as
(6.2.30)
-" - z e m ~
P Approximating z by a constant Z gives the loss of exergy
To Qs = mRm To z In
P1
(6.2.31)
P2 In particular for an ideal gas (z = 1) this equals the power exerted by isothermal expansion from P1 to P2, at temperature To; this amount is lost by the throttling. We also conclude from (6.2.28) that for a liquid, the loss of exergy will be usually negligible, as V is relatively small for a condensed phase. If the fluid is an ideal gas, let us expand it from P1 to P2 isothermally at its actual temperature T (> TO). With ~ = 1 in (6.2.31) the power exerted will be ^
W-
To Q s
at the expense of heat supply Q - W. If the heat were transferred reversibly from T to TOby a Carnot cycle, we should gain
W
~
1
TO
T - 1)ToQ s
hence in the total, we have lost W - W' = ToQ s
which is just the loss of exergy.
Example 5. Blending of streams with different temperatures
Fig. 6-6. Blending of streams
148
Material and Energy Balancing in the Process Industries
T w o streams of the same composition, stream j with mass flowrate mj and temperature Tj, are blended according to Fig. 6-6. The balances read m~ /~l + m2 /_~2 __ (m l+m 2 )/.)3
(6.2.32)
and m l
+
m2
+ Qs - ( m l + m 2 )
^
(6.2.33)
9
^
Taking H = 0 and S = 0 at temperature To we obtain, with constant specific heat Cp m 2 Cp ( T 2 - T o ) - (m,+m 2 ) Cp (T3-To )
m 1 Cp ( T l - T 0 ) +
thus m l T1 + m2 T2 T3 =
(6.2.34) m1+ m 2
and
7"1 m 1c o
In
7"o
+ m 2co
In
Vo
+ Qs - (ml+m2) Cp In
7"o
hence
To Q s = cp T o
m 1 In
7"3
(6.2.35)
+ m 2 In
T~
T2
with T 3 by (6.2.34). Clearly, if T1 - 7'2 then also T 3 = 7'1 - T2 and TOQs - 0. Denoting A-
T 2 - T,
(6.2.36)
Qs is function of T~ and A, given m~ and m2. The reader can verify the derivatives ~Qs ~A
- Cp
m 1m 2
A
ml+m 2 T 2 T 3
(6.2.37)
Chapter 6 - Entropy and Exergy Balances
151
(C. 12). If i-th stream is of mass flowrate mi, with mass fraction y~ of component Ck,then the mole flowrate nki o f C k equals i _
nk
1
i
-Mk Ykmi
(6.2.48)
and the mole fraction of Ck equals, in a K-component mixture i nk
x~= K
(k = 1, ..., K)
(6.2.49)
i ~E n~ l=l
Let us now return to our Fig. 6-6. Stream i is of mass flowrate mi, with composition determined by mole fractions x~, according to (6.2.48 and 49); recall that only K-1 mole (or mass) fractions are independent. For simplicity, let however (temperatures) (6.2.50)
T~- T 2 - T (say). The component balances read, first in mass units y~ ml + y2 m2 = y3 (m,+m2) .
(6.2.51)
Pressure P being fixed, the specific enthalpy /4ok of pure Ck will be written as Hok (T) at temperature T. Hence using the additivity (6.2.47), the enthalpy balance reads K Z k=l y ~ H o k ( T ) m
1
K + k~l Y2/Q~
K = k~l Y 3 / ~ ~
hence by (6.2.51) K
K
Z yk3/)Ok (7) -- k__E1y3/)Ok (T3)
k=l
where the LHS is specific enthalpy of the stream 3 mixture at temperature T, the RHS that of the same mixture at temperature T3 Because specific enthalpy of a given mixture increases with temperature, we must have also T3 = T hence the temperature remains unchanged.
(6.2.52)
Material and Energy Balancing in the Process Industries
132
In the entropy balance, we shall make use of the formula (6.2.45) with (6.2.48 and 4 9 ) H e n c e , in i-th stream m i S,,.~ -
~K
k=l
r/ki (S0k-Rlnx~)
(6.2.53)
m
where Sok means molar entropy of pure Ck at the given (T, P), the same for all streams. Here, rtki a n d x ki are k n o w n for i = 1 and 2. Because the n u m b e r s of moles remain conserved, we have the balances (6.2.51) in mole units
Xk
I + ~
n2 -
X3k(nl+n 2)
(6.2.54)
where K n i
l=l
nl
9
,,,-,.--,..-,.-,/
C o n s e q u e n t l y the entropy balance reads
Qs
=
K k~l n3 (S~
K
Rlnx3) -
k~l
K n~ (Sok- Rlnx~) - k=~l n[ (S0k- Rlnx~) -
K (n 3 - n k1_ n 2k ) S- o k + R K - n k31nX3k) = 22 Z (n l l n x 1 + n 21nX~k k k=l k=l w h e r e rt k3 (/'/~ + rtk 2) = 0. Here, we put formally (limit value) XklnX k -- 0 if Xk = 0, thus if c o m p o n e n t Ck is absent in some s t r e a m . Hence _
Qs=R
K Z k=l
1 In - -
nk
X3
+
2 In
nk
(6.2.56)
/
X3 /
where rt 1 n2 x3 - n~ + n 2 x~, + n l + n 2 X2k
(6.2.57)
with (6.2.55) for i = 1 and 2. In this manner, the entropy production is d e t e r m i n e d by the given parameters of the inlet streams 1 and 2. It is seen immediately that if the streams 1 and 2 are of the s a m e 1 c o m p o s i t i o n then Qs - 0, because thus ~ = x k = ~ . It can be shown quite formally that otherwise Qs > 0. 1
1
The idea of the proof is as follows. One sets Yk(t) = Xk + Pk t where Pk = ~ - Xk 9 One then examines the function Qs (t), where Yk(t) is substituted for ~ in (6.2.56) with i i (6.2.57) and nki = nXk. One can show that Qs (0) = 0 and (derivatives) Q~ (0) = 0, Qs (t) > 0 for any t. Hence Qs (1) > 0, with Qs (1) = Qs (6.2.56).
153
C h a p t e r 6 - Entropy and Exergy Balances
Let in particular streams 1 and 2 consist of pure species C~ and C2, respectively. Then /,/1
x] -
?/2
and
n 1+ n 2
x23 -
/,/1 +
(6.2.58)
n2
and 1
1
Qs = R (n 1 In _-S-_3+ n2 In ~ X1
)
X~
hence Qs = - R(n ~ln x~ + n 21n x3) = - R(n' + n 2) (x~ln x~ + x~ln x~).
(6.2.59)
The meaning of the entropy production can be illustrated by considering an inverse process, viz. separation of components; see the next example.
Example 7. Separation of components The following example is a higly idealized example of absorption with solvent regeneration. Gas mixture of components C~ and C2 is separated by absorption of C2 in a solvent where C1 is insoluble, and which can be .regenerated by desorption of C2 under reduced pressure and heat supply. The solvent itself is of negligible equilibrium vapour pressure (nonvolatile) at the desorption temperature. The gas mixture (C1, C2) is ideal. 1
c
~- Ct
- -
pressure reduction
I
Qm
p I I I
win
Fig. 6-7. Absorption unit with absorber A, desorber D, cooler C, pump P, and vacuum pump VP
MaterialandEnergyBalancingin the ProcessIndustries
154
Mixture (C~, C 2 ) is separated in absorber A. The fraction of C2 in outlet stream 1 is neglected. Liquid solvent containing absorbed C2 flows into desorber D, where heat Qin is supplied, and is then pumped through cooler C back into A. From C, heat Qout is withdrawn. The power supply to pump P and vacuum pump VP is Win. The outlet stream 2 from VP is pure C2. The energy balance reads
Qin + Win "- gtlflp (Zl-Z3) -t- n2f2p (Z2-Z3) + Qout
(6.2.60)
because the enthalpy of the ideal gas mixture is simple sum of enthalpies of the components; nj are mole flowrates, C~ are (constant) molar heats of streams (pure components) j = 1 and 2 (n3=nl+n2).The entropy balance (inequality) reads
0
Qout ~
QS
--
Oin -
Tout
-I" n 1
Rlnx31 + n 2 Rlnx~2 + n~Clp In
Tin
T1
T3
+ n 2 ~ In
T2
T3
as the reader can readily find using (6.1.2) and (6.2.53). Here, we have denoted by Qs the entropy production in the separation unit. Hence
Qout
-
Lut
Qin + n 1 1 T1 Co In + n2 ~ln Tin T3
7"2
=Qs, +Qs >Qs
(6.2.61)
T3
where Qs is the entropy production by blending components C1 and C2 according to (6.2.59). Thus if the mixture has been made up from the components by blending at temperature T3 , TOQs was the loss of exergy. The re-separation of the components according to our scheme requires some heat supply Qin at temperature Tin and heat Qout is withdrawn at temperature Tout , obeying in addition the balance (6.2.60), possibly with power supply Win. For simplicity, we take Tin and Tout as constant on the heat transfer Surfaces. Using (6.2.60) in (6.2.61) we have _
Lut
Qin + Win ----
Tin T1
-n'Clp(T,-T3-Toutln-~3 ) +n2C~p(T2- T~- ToutlnmT3
+ Tout(Qs+Qs) (6.2.62)
where Qs > 0. The equation is of another type than those examined above. We do not know the temperatures T~, T2 , Tin, To,t , nor the heat input/output. They will depend on the detailed design of the process. If they were known, we could
Chapter 6 - Entropy and Exergy Balances
155
again evaluate the loss of exergy TOQs. Our goal is, however, conversely to assess the minimum energy (exergy) requirements for the separation. Let us plausibly assume that Qs' > n lC~ In T1 + n 2 ~ In T2
(6.2.63)
because the RHS is sum of terms representing only change of entropy due to change of temperature from/'3 to T~ resp. T2 for stream 1 resp. 2; for example if T~ ~ T3 we shall have anyway some (irreversible) heat transfer in the absorption column. Recall in addition that the absorption itself is an irreversible process producing entropy. We then have the inequality
1
-
root) Tin
Qin + Win > n' C~p(T~-T3) + n 2 Cp2 (Tz-T3) + Tout Qs
9
(6.2.64)
Suppose the RHS is positive. Because decreasing Tout decreases the RHS and increases the coefficient at Qin, let us set Tout = TOas the lower limit; by the way, lower temperature of the solvent is favourable for the absorption. Then
1
-
.T~
Qin § Win ~ n l C o1 (T1-T3) + n 2 C~p(T2-T3) + TOa s
(6.2.65)
where the LHS can be regarded as consumption of exergy. Let T3 = T0, T~ > TO and T2 > T0. Then under plausible assumptions, the loss of exergy by mixing represents a lower bound for exergy consumed in re-separation. The conclusion appears obvious due to the intuitive idea of exergy: its loss has to be re-supplied. In our lengthy derivation, we have specified how it can be done. Denoting n = n l + n 2 and x = x 3 in (6.2.59) we have To Qs = - nRTo ((l-x) In (l-x) + xlnx)
(0 < x < 1)
(6.2.66)
where fix) = - ((l-x) In (l-x) + xlnx) tends to zero both for x ~ 0 and for x ~ and is maximum at x - 1/2. Thus To Qs < nRTo In 2 - 0.69 n R T o .
1,
(6.2.66a)
The relevance of the term can change when one of the components, say C 2 , is the only valuable product and the loss of exergy is related to its quantity (n 2 ). Let us consider a very diluted component C 2 in the mixture. Then
156
T oQs ll 2
Material and Energy Balancing in the Process Industries
nl = - RTo
n2
+1
(( 1-x) In ( 1-x) + xlnx)
where x is the mole fraction of C 2 in the input stream 3. With r/1 > > /72 we have 1-x ~ 1 and n~x ~ n 2, hence To Qs 1,/2
1
--- R T o In -X
(for x << 1)
(6.2.67)
can be quite important; imagine isothermal compression at temperature TOfrom pressure P0 to ( l / x ) P 0 . Imagine separation of sulphur dioxide in utilizable concentrated form from power plant combustion gases; we there have x of the order 10 -3. Generally, the exergy limit obtained in the above manner is not very informative. Going back to (6.2.64), observe that the admissible values of the parameters depend on a more detailed specification of the process. Also in the details, the thermodynamic (and other) laws will apply and impose certain limitations. For example the balances and entropy inequalities for the nodes A and D in Fig. 6-7 must hold separately. Thus the input work Win in (6.2.60 and 64) cannot be chosen arbitrarily, for instance in the manner that we could set Q i n -" 0 irrespective of the detailed balances. The exergy approach can yield, if anything, only a first information. As another example of separation process and at the same level of idealisation, let us consider binary (2-component) distillation.
( CI,C2 )
2
Qin
Fig. 6-8. Distillation unit with column D, cooler C, and boiler B
C2
Chapter 6 - Entropy and Exergy Balances
157
The input stream 3 is now an ideal liquid mixture and, with an infinite number of plates, the components C~ and C2 are fully separated in distillation column D. C is condenser (heat Qout withdrawn) and B is boiler (heat ain supplied). Putting Win : 0, the balances (6.2.60) and (6.2.61) apply. Again quite plausibly, the inequality (6.2.63) is assumed, from where the inequality (6.2.64)
out)
1 - ~in
Qin > n'Clp (T1-T3) + n2C~p(T2-T3) + ToutQs
(6.2.68)
Qs is again the 'mixing entropy' (6.2.59). We consider Tou t resp. Tin as temperatures at the inner side of the condenser resp. boiler, and put (6.2.69)
T, = Tou t resp. T2 = Ti,
equal to the equilibrium temperature at the boiling point of C~ resp. C2. Again, the information that can be drawn from the inequality (6.2.68) is limited; a more detailed analysis of the process would be necessary. In order to obtain a lower estimate for the energy input Qin, let us adopt further simplifications. Observe that the sum _
A
-
n'
I(TI-T3) + n 2
= n 1 C~p(TI-To) + n 2 C2p (T2-To)- (n ~ C~+ n 2 C2p) (T3-T0)
with TOas reference temperature means sensible heat difference between output and input streams; by virtue of (6.2.60) with Win "- 0, it equals Oin - Qout. Let us assume that no extra heat is supplied or withdrawn, thus the inlet temperature T3 is such that A = 0. Then our inequality reads T1
Qin -> T1 Qs
where T~ < T2 .
(6.2.70)
This is a lower estimate for the energy (heat) consumption Qin, thus indirectly also for the reflux ratio required for the separation, because Qin involves evaporation heat of component C2, transformed in the column into that of C~. In addition to the importance of the term Qs (mixing entropy), we see that the greater is the ratio T~/T2 (< 1), the more difficult is the separation. Two components of nearly equal boiling points can only hardly be separated by distillation; a well-known fact.
Material and Energy Balancing in the Process Industries
158
Example 8. R e a c t o r Q
1
,..I
3 Fig. 6-9. Reactor
The components are Ck (k = 1, ..-, K). We consider one reaction (4.2.3), thus K
(6.2.71)
Z VkCk -- 0 k=l
With (positive) mass flowrates m i the component balances (4.2.1) read k = 1, . . . , K: y~m 3 - y~m 1 + y ~ m 2 + MkVk WR
(6.2.72)
where WR is the integral ('extensive') reaction rate. We have (6.2.73)
m3 = m 1 + m2
The enthalpy balance (6.1.1) reads /-jr3m3 =/-]rim
I +/2/am 2 + Q
(6.2.74)
With partial specific enthalpies/4~ of components C k in stream i we have K
/T = Z y~/4~ .
(6.2.75)
k=l
By virtue of (6.2.72), from (6.2.74 and 75) follows K Z ( y ~ m 1 (/Q3_/_~) + k=l -
K
y~m2 (/~3_/_)~)) + (?1MkVk/43) WR = Q" =
(6.2.76)
K
Here, H R = Z M k v k/4k k=l
(6.2.77)
is molar (isobaric) heat of reaction (reaction enthalpy), in (6.2.76) computed as HR3 at the stream 3 parameters. We shall consider only such cases where H R is of the same algebraic sign in the whole range of admissible parameters. Then the reaction is called
Chapter 6 - Entropy and Exergy Balances
159
m
a)
exothermic if
HR < 0
(6.2.78a)
b)
endothermic if H R > 0
(6.2.78b)
Ti is (absolute) temperature of stream i, pressure P is assumed constant. Given m~, m2, and the inlet streams' compositions, we can compute m 3 and the outlet composition, provided that either WR directly, or one of the outlet mass fractions y3, such that Vk * 0, is given. Given the inlet concentrations, temperatures (and states of aggregation), we know/4~ and/q2. Then having prescribed also T3 , we know/~3 thus Q. Or, given Q we know/~3, thus also T3 can be computed, as/~3 is increasing function of T3 . We admit also Q - 0. If Q , 0, we consider the heat transfer surface q4pat the outer side of the reactor walls, inside the heating/cooling medium. We introduce the mean temperature Tq of the medium, formally by the equation 1
T~
dq
O =wfT~
(6.2.79)
where the integral represents the surface integral in (D.11). According to (6.2.78), we assume in case a)
Q < 0 and if Q < 0 then Tq < T3
(6.2.80a)
in caseb)
Q>0andifQ>0thenTq>T
(6.2.80b)
3 .
Then the entropy production Qs equals, by (6.1.2) Qs = $3m3- Slml - S2m2-
O
T.
(6.2.81)
With partial specific entropies S~ of component C k in stream i we have g ^"
. 1
^. 1
S ~ - ~: YkSk k=l
(6.2.82)
and in the same manner as in (6.2.76),
K (Yk~m, (Sk-S "3 ",k ) + Yk2 m2 (Sk-Sk)) "3 "2 + (k~21 Tq Qs =k__Z1 = Mk Vk Sk "3 ) WR- Q
(6.2.83)
We shall use the thermodynamic relation
ft~ =/L- T&
(6.2.84)
160
Material and Energy Balancing in the Process Industries
where Ok -- ~tk/Mk is chemical potential per unit_mass of component Ck; for an ideal mixture we have (6.2.43 and 44), with Sk = Mk Sk" Thus multiplying (6.2.76) by 1/T 3 and adding to (6.2.83) we obtain
Qs
K =k~l (yl ml A~ + y2 m2 A~ ) +
1A3
WR +
(1
-
1 )
Tq
Q
(6.2.85)
where j - 1, 2: A~
1 ~3_ S ~ - ~ 3 (/~3_/~)
(6.2.86)
and K K A 3 = - Z M kv kl23 = - Z v k~t3; k=l k=l
(6.2,87)
here, ~t~ = M k 0.3 is chemical potential of component Ck at the stream 3 parameters. Generally, the quantity K K A - - Z v k ~tk - - Z Mk Vk ftk k=l k=l
(6.2.88)
is called affinity of the reaction (6.2.71), at given T, P, and composition of the mixture. It is a function of local variables and makes sense at any point of the reactor region. According to the laws of classical chemical thermodynamics, the reaction equilibrium is determined by the condition A = 0. Thus if A ~ 0, the absolute value is a 'distance from equilibrium'. According to the principles of nonequilibrium thermodynamics, the reaction proceeds in the direction assumed by (6.2.71) (v k > 0 for reaction products by convention) if A > 0, in the opposite direction if A < 0. Here, we suppose of course that the overall direction of the reaction in node R is as prescribed by the reaction scheme, thus the integral reaction rate WR > 0. With a complicated temperature and composition profile in R, it could happen that we had not A > 0 everywhere in the reactor; we shall not consider such possibility and in particular we shall suppose A > 0 at the outlet conditions. In (6.2.87), A is computed at (cross-section averaged) outlet conditions, hence also A3 > 0 .
(6.2.89)
Certain reactions (such as combustion reactions) have the property that their affinity is positive (A > 0) up to a state where the concentration of some
Chapter 6 - Entropy and Exergy Balances
161
component practically vanishes (imagine 2 H 2 + 02 = 2 H 2 0 in excess of oxygen), thus becomes negligibly small; not very precisely, they are called 'irreversible' (although any reaction, so long as it proceeds, represents an irreversible, i.e. nonequilibrium process). If the reaction is sufficiently fast even near the equilibrium (imagine again combustion), it can happen that the outlet value A 3 thus also A 3 WR becomes negligibly small in (6.2.85). On the other hand, it can happen that (for instance at low temperatures) the rate of some reaction is practically zero even if A > 0 ('frozen reactions'). In the latter case, we suppose that the reaction is catalyzed; but even then, the condition (6.2.89) is necessary. For reactions that are not 'irreversible' in the above sense, the condition (6.2.89) restricts the attainable integral reaction rate W~; see below. In the sequel, let us further simplify the hypotheses. Let us assume that all the streams are ideal mixtures without change in state of aggregation. Then (cf. Example 6) 1
j - 1, 2: S~ - Sk (Tj)-
Rlnx~
^ where Sk (Tj) is specific entropy of species Ck at temperature Tj, and x], is mole fraction of Ck in stream j; in stream 3 we have Cpk d T Rlnx 3 T Mk
S~ = Sk ( r j ) +
where in addition Cpk is specific heat of Ck. For enthalpies we have simply j=l,
2 " / ~ = / q k ( T j)
and r3 /-tk3 = & (Tj) + ~ CpkdT
T,
where/4k (Tj) is specific enthalpy of Ck at Tj. Hence in (6.2.85 and 86) R
A~-- 5~- --~-g (lnx 3- lnx~) where
Tl•(1 9
T
1
T3
CpkdT = J
r~
1
T3
/
1
T
CpkdT >- 0
(6.2.90)
162
Material and Energy Balancing in the Process Industries
because in the integrals, T3- T > 0 i f T j designate
< T3, T - T3 > 0 i f T j >
K A - Z (y~ m 1 Ak1 + y2 m2 A2 ) k=l
T3. Let us
(6.2.91)
Then K
A - E (y~ m, 8~ + y2 m2 5~) + S x k=l
(6.2.92)
where K
Sx - R E
k=l
(n l l n x ~ + n k21nX~k - (n~ + n 2 ) lnx3) 9
(6.2.93)
here (cf. Example 6) n~ -
y~ mj
(6.2.94)
is mole flowrate of component Ck in stream j. Recall that nJk x~ -
nJ
K where n j = Z n~ k=l
(6.2.95)
and the convention x~ lnx~ = 0 if x~ = 0, as the limit value. Because x~ lnx~ (< 0) is minimum at lnx~ = - 1 where it equals -exp(-1), ~ 2k )lnx~ we have (0 >) n kl lnxl + n 2k lnx~k > _ _exp(_l)(nl+n2). On the other hand -(nk+n (> 0) increases to infinity when the outlet stream mole fraction x 3 tends to zero; thus if some ~ is sufficiently small, the whole Sx becomes positive. So as to simplify the following discussion, let us assume that some component, say CK present in one of the inlet streams, is consumed by the reaction to the extent that we have S x > 0. This means, by (6.2.72) where vK < 0, a sufficiently high integral reaction rate WR . We thus assume WR such that Sx > 0 .
(6.2.96)
By (6.2.85) with (6.2.91)
Qs-A+
1 A3WR +
1 (6.2.97)
Chapter 6 - Entropy and Exergy Balances
163
where A > Sx according to (6.2.90 and 92). We have also the inequality (6.2.89) with WR > 0, and from the assumptions (6.2.80) follows 1
1
Q > O.
T.
(6.2.98)
Thus Qs > A _> Sx
(6.2.99)
and Qs > 0 with positive lower bound (6.2.96), if the integral reaction rate is sufficiently great. Recall also the balances (6.2.76). By hypothesis,/4~ -/4k (Ti) is specific enthalpy of species Ck at temperature Ti. Hence the balance reads T~
T3 2I Cp2 d T = Q - H 3 R W R r~
m 1 ; Cp' d T + m
L
(6.2.100)
where c~ is specific heat of stream j. Let us return to the condition (6.2.89). Because, by (6.2.42) and (6.2.84), ~9(pk / T)
1 =-
1
-
r
thus ~9(pk / T) ~gT
1 =-
-
T2
Hk --
1 T2
^
Mk H k
(6.2.101)
we have, by (6.2.88) with (6.2.77) ~(A/T)
~T
1
-
T:
-
HR 9
(6.2.102)
m
Hence if H R < 0 (exothermic reaction), A / T decreases with increasing temperature and can become zero, thus also A = 0 if sufficient heat is not withdrawn from the reactor. On the other hand, there is always an upper limit f o r WR imposed by the condition A 3 > O, on assuming that the stream 3 parameters tend to the equilibrium ones with increasing W R. Increasing the outlet temperature T3 thus decreases this upper limit if H R < 0. A case in point is conversion of sulphur
164
Material and Energy Balancing in the Process Industries
dioxide to sulphur trioxide (see Sections 4.6 and 5.3). If H R > 0 (endothermic reaction) then A/T decreases with decreasing temperature and can become zero if sufficient heat is not supplied. By the same consideration as above, we conclude that decreasing the temperature T3 decreases the upper limit for W~. A classroom example is reaction of nitrogen with oxygen, which does not take place at all under atmospheric conditions; small concentrations of nitrogen oxides can be found in combustion gases, generally the higher the higher is the combustion temperature. Less elementary examples are hydrocarbon cracking processes. There, however, we have a complicated reaction scheme with more than one reaction (6.2.71). The dependence of the entropy production Qs on the process parameters is complicated, even if the inlet mass flowrates and compositions have been fixed. The outlet temperature T3 depends on T~, T2, Q, WR, and the outlet composition depends on WR. But WR is limited by the condition A3 > 0 where A3 depends on T3 as well as on the stream 3 composition. On the other hand, WR is also limitedby the reaction kinetics; taking T3 too low, the reaction rate could become negligibly small (a 'frozen reaction') even in the presence of a catalyzer. Relatively simple is the case of 'fast irreversible reactions', such as combustion reactions. Then, in a broad range of parameters, the integral reaction rate WR attains its maximum (complete combustion) and the outlet composition is fixed by this condition (see also (6.2.116) below). Thus Qs depends on T~, T2 , and Q, given Tq obeying the conditions (6.2.80). At constant T1 and T2 , (6.2.74) implies m 3 Cp3
(6.2.103)
Cp3is specific heat of stream 3, thus by (6.2.81)
where ~)Qs
0Q
1
dQ
1 --
dT3
3 Cp
m
3
1 -
T3
dQ
1 --
Tq
1 -
T3
(6.2.104)
Tq
By virtue of (6.2.80a), for an exothermic reaction the entropy production increases with decreasing Q (< 0), thus with increasing withdrawn heat I Q I . Recall, however, that T3 depends on Q thus given Tq, I QI is limited by the condition T3 > Tq. Given T1 and T2 , Qs is thus smallest when Q = 0, thus when T~ is maximum. Further, varying for example T~ and leaving T2 and Q fixed, according to (6.2.74) we have 3 m3Cp d T 1
1
-- mlc
p
(6.2.105)
Chapter 6 - Entropy and Exergy Balances
165
thus by (6.2.81) ~Qs
1
3 Cp
--
~T1
dT 3
1
m 3
T3
-
dT1
m 1
TI
1 1 Cp = m l C p
1
1
(612.106) - T1 )
and in the same manner 2 -- m 2 Cp
1
1
(6.2.107)
The reader can_himself make the analysis. Observe that if Q - 0 then, by (6.2.100), with HR < 0 (exothermic reaction) at least for one of the Tj (j - 1 or 2) we must have T3 > Tj thus OQs/~Tj < 0. The assumption T3 > Tj (for j - both 1 and 2) is natural for a combustion reaction. Then Qs is the smaller the greater are the inlet temperatures Tj thus, considering (6.2.105), the higher are the temperatures in the reactor; see also the above result for the (Q, Qs ) dependence. A pragmatical interpretation in terms of a 'lost work' is, however, not immediately obvious. In a general case, let us retum to the expression (6.2.97) with (6.2.92 and 93). Whatever be the integral reaction rate WR, we can minimize the terms 8~ in (6.2.92) and the last term in (6.2.97) by setting T~ - T2 - T3 = Tq; indeed, the latter term is minimum (zero) by (6.2.98), and t_he 8Jk are minimum (zero) by (6.2.90). The case is basically possible when Q - H R WR in (6_2.100), thus when withdrawing/supplying sufficient amount of heat I QI = I HR I WR, and with infinite heat transfer surface admitting T3 = Tq as the limit in (6.2.80). We thus have A3 Qs > Sx +
w R with equality for T1 - T2 = T3 = Tq .
(6.2.108)
This minimum is thus approached with a uniform temperature profile in the reactor. Given temperature T3 required for instance by the reaction kinetics, we can pre-heat the inlet streams 1 and 2, as far as possible by heat exchange with outlet stream 3, and by an adequate (+) heat supply maintain the uniform profile; the temperature of the heating/cooling medium is as close as possible to the temperature in the reactor. The scheme is ideal and for instance in case of combustion reactions, not realistic. It represents just a theoretical limit. Let us give another expression to the RHS term in (6.2.108). According to (6.2.87) with (6.2.43), using the definition (6.2.93) and the balances (6.2.72) we have
166
Material and Energy Balancing in the Process Industries
A3
Sx+
K WR = R Z (n I lnx~ + n~ lnX~k- (n I + n2) ln~k) k=l 1
K
Z v k (p3 k + R T 3 lnx~k)W R T 3 k=l K =RE
k=l
1
K ( n ~ l n x ~ + n k2 1 n x ~ k ) + R Z
k=l
K
T 3 k=l
3 (v k W R - n k)lnx~k
K
Vk~3k
W R -
R
where p3 k is chemical potential of pure species Ck at temperature T 3 and at the stream 3 state of aggregation. Hence A3 Sx +
1 WR -- Sn~x-
G 3 WR
(6.2.109)
where K S~x = R Z (n~ lnx~ + k=l
n k2 lnX~k - n k3 lnX~k)
and
(6.2.110)
c. - zK The ' m i x i n g term' Sn~x is bounded in its absolute value, considering again that I//ki lnXk I -- /'li I Xki lnXk I (-- F/i exp (-1)" , see the paragraph after formula (6.2.95). It is the last term in (6.2.109) that can become critical. The function -
K
G R (T) =k__E1v k Pok (T)
(6.2.111)
is reaction f r e e enthalpy (Gibbs free energy), at temperature T (in molar units). Because (affinity) K K A(7) = - Z v k Pk = - GR (T) - R T Z v k lnx k k=l k=l
Chapter 6 - Entropy and Exergy Balances
167
the equilibrium condition A(T) = 0 determines
K
-1
Z v k lnx k -
RT
k=l
-
G R (T) .
(6.2.112)
I f - G R (T)/RT >> 1 (as is the case of combustion reactions) then at least for one of the components Ck with Vk < 0 (consumed by the reaction), say Cry, we have (say) aK -- VK lnXK >> 1, hence afortiori XK -- exp(aK/VK ) << 1. In the simple case of one reaction as considered above, C~: is the one species (say the combustible species) whose outlet concentration practically vanishes at equilibrium. As an example, let us consider combustion of methane in air according to the reaction C H 4 + 2 02 - C O 2 + 2 H 2 0 (in gas state). With 10 % excess of oxygen we obtain the (adiabatic) combustion temperature T3 - 2200 K and -G 3/(RT 3) = 47. We then find the equilibrium mole fraction of methane (CK) x 3 = 3 . 5 X 1 0 -2~ after combustion. So for 'irreversible reactions' as introduced above, we have
>> R
(6.2.1.13)
up to high temperatures T3 occurring in practice, where the reaction is fast and equilibrium is attained. This term then determines, by (6.2.109), the lower bound of entropy production. It can be computed by integration, for simplicity assuming that the state of aggregation of the species C k does not change down to temperature T0. Then, using the relation (6.2.101) for g0k we have --3R G
--0R G
T3
+
_-
1
ofi
-
HR (T) dT
(6.2.114)
where -
K
H.=kZ 1
-
m
Here, H0k (T) is molar enthalpy of pure species C k at temperature T, for ideal mixtures equal to the partial molar enthalpy of Ck; thus H R is the reaction heat. The latter can be found by integration of the relation
gHR aT
K -
k=l
MkVkCpk
(6.2.115)
168
Material and Energy Balancing in the Process Industries m
m
where Cpk is (isobaric) specific heat of C k . The constant G ~ - G R (To ), at reference temperature To , usually denoted_as AG o, can be found in thermodynamical tables, as well as the value of H R (To ), usually denoted as AH ~ (standard reaction heat). Assuming x 3 << 1 for the vanishing component CK, we can approximate the integral reaction rate WR putting x 3 = 0 in (6.2.72). Thus, with a good approximation
WR -
(y~ m~ + y2 m2 )
(6.2.116)
-M KV K
(recall VK < 0) can be used in (6.2.109), for a fast 'irreversible reaction'. The loss of exergy ToQ s can thus be computed. Its lower bound is given by -
TO u
To Q s > To Sn~x - Z- G 3RWR
"13
(6.2.117)
Hence, at least for fast irreversible reactions, by (6.2.113) the loss of exergy is enormous whatever be the arrangement of the process. Classical thermodynamics knows still another hypothetical device in addition to the reversibly-working Carnot cycles, viz. the reversible galvanic (electrochemical) cell. In this device, with constant volume the electric work (say) We equals the affinity of the reaction, per unit integral reaction rate. Thus considering the cell working at temperature To with pure species Ck, we have B
(6.2.118)
We - -G ~ WR n
assuming of course G ~ < 0 in order to have We > 0 with WR > 0. Putting W' - -We in (6.1.4), with TO= Th we easily find that the loss of exergy TOQs = 0. We shall not attempt to precise the conditions for attaining this upper limit of exploitable energy. In practice, the efficiency of (for instance) fuel cells has been quite low so far.
Remarks The examples encompass all relevant sources of irreversibility (entropy production). Examples 1,2,3, as well as 5 demonstrate the entropy production by heat flow under gradients of temperature. The temperature gradients, not occurring explicitly in the equations, are concentrated near the separating surfaces
Chapter
6 -
Entropy and Exergy Balances
169
(walls) in Examples 1, 2, and 3, and in the region where the two streams meet in Example 5. In the bulk of the fluids, the heat transport is mainly due to turbulence; in our simplified models, we regard the fluids as uniform at the inlet and outlet cross sections. It has turned out that generally, the same heat flow under the same gradients produces the more entropy the lower is the temperature. This fact can be explained theoretically when considering the explicit expression (D.8) for the local entropy production (whose our Qs is the integral over the whole volume considered). Indeed, the local entropy production by heat conduction is inversely proportional to the square of the absolute temperature. Multiplying Qs by temperature To of the environment (infinite reservoir), we obtain the loss of exergy, thus a kind of lost work, according to the traditional ideas of classical thermodynamics (whose modem thermodynamics is a far-reaching generalisation). See the last three paragraphs of Example 3. The classical result is in agreement with modem theory; only the idea of 'lost work' is not always that clear from the viewpoint of practice. Entropy production by viscous friction is illustrated by Example 4; in a perfect fluid (with zero viscosity), no pressure would be lost and no entropy produced. Imagine an ideal gas in (6.2.31). The factor To is due to the hypothetical possibility of expanding the gas isothermally at given temperature T (giving TQs instead of To Qs ) and then recover the supplied heat Q by a reversible Carnot cycle, with Carnot efficiency (1 - To /T). Observe that the quantity TQ s represents the (integral) 'dissipation of energy', as introduced in nonequilibrium thermodynamics; see (D.7). One could also expand the gas adiabatically, but exerting work at the expense of its internal energy. What amount of work is actually lost, depends clearly on circumstances. Entropy production by diffusion under concentration gradients is illustrated by Example 6. The concentration gradients occur mainly in the region where the two streams meet. The meaning of the entropy production and loss of exergy is illustrated indirectly in Example 7 in terms of energy needed for re-separation. Certain conclusions of qualitative or approximative character (first estimates) can be made. Generally however, the quantitative information drawn from the entropy production term is rather limited. Finally, Example 8 is more complex in that it comprises entropy production due to chemical reaction in combination with heat transfer, and also diffusion; the role of the latter appears as marginal. The example can also be regarded as an example of complex single-node balancing, a kind of thermodynamic analysis included. Concerning the entropy production (or loss of exergy), it turns out that the 'chemical' portion, thus the t e r m - ( G ~ / T 3 ) WR in (6.2.109) can represent an enormous item in the exergy balance; it can be computed, but this is usually all that we can do in practice. In other terms, what kind of work has been actually lost, is a matter of theoretical speculations only.
170 6.3
Material and Energy Balancing in the Process Industries
EXAMPLES OF EXERGETIC ANALYSIS
The following three examples are simple case studies, where the loss of exergy is evaluated for each member of a set of units. The values may indicate how energy is exploited in each unit. If the loss of exergy is relatively great this fact is, by the underlying philosophy, regarded as an incentive to a rationalisation of the process.
6.3.1
Heat exchanger network
1(100)
n(8o)~"
III(80,
I
176
IS0 157
)4
30__~0~
VI(10)
260 ~~~._ 280130%
7(30)
~~70~
Fig. 6-10. Heatexchangernetwork.Numbersat streamsare temperatures(deg C). Numbersin parenthesesare heatcapacities(kW/K) The heat exchanger network according to Fig. 6-10 serves for preheating stream I by five streams (II-VI) in exchangers El-E6. Streams II, III, and VI are further cooled in coolers C1,2,3. Stream I is split in given ratio and both streams are again blended in node B. The temperatures of stream I not given in the Figure can be computed from the heat balances, on assuming constant heat capacities (mCpin Example 3 of Section 6.2). The results of the (energy and) exergy balances are summarized in Tab. 6.1.
Chapter 6 - Entropy and Exergy Balances
171
Tab. 6-1. Exergetic analysis of heat exchanger network (TO= 298 K) Node
E1 E2 E3 E4 E5 E6 C1 C2 C3 B
E(total)
Qs
ToQs
kW/K
kW
2.336 1.888 0.894 0.620 0.422 0.418 1.663 2.589 0.716 0.020
696 563 266 185 126 125 496 771 213 6
11.566
3 447
T0as
Q
ToQs l Q
kW
1
20.2 16.3 7.7 5.4 3.7 3.6 14.4 22.3 6.2 0.2
4 000 4 000 2 500 2 100 600 800 3 200 3 200 600 0
0.174 0.141 0.106 0.088 0.210 0.156 0.155 0.241 0.355 -
100.0
21 000
0.164
EToQs %
We shall not analyze the results in detail. Let us only stress one important statement. As the detailed analysis shows, the loss of exergy is greater at lower temperatures, given the transferred heat and temperature gradients in the exchanger. This is in accord with the previous general analysis in Section 6.2, Example 3 and Remarks, first paragraph. So generally, exergetic analysis of heat exchangers makes the irreversibility effects at lower temperatures more critical. Now there exists another, nowadays standard method, so-called pinch technology (Linnhoff and coll. 1982) based on 'pinch analysis' (PA). The method makes use of a simpler classical formulation of the 2 nd Law: heat cannot flow from lower to higher temperatures. Comparing the results of both methods, we find an agreement in some cases. But for instance exchanger E6 is inadequately placed according to the PA method, while the exergetic analysis arrives at no such conclusion: the exchanger works at a high temperature level and the loss of exergy is relatively small. On the contrary, cooler C2 works at a low temperature level with a great loss of exergy; the PA method, however, does not qualify the cooler as inadequately placed. Indeed, the cooler withdraws a low-potential heat, which is difficult to use in the given plant. The pinch technology, having proved useful in practice, appears as preferable. It distributes the transferred heats in an optimum way according to the actual situation and needs of the plant. On the contrary, the exergy method regards any heat as exploitable, if not otherwise then in a Carnot cycle. Clearly, such possibility can be quite hypothetical.
172
6.3.2
Material and Energy Balancing in the Process Industries
Distillation unit
Q)---_:-?~---,
............ I
303 K
[ / !' ' lJ
293 K
I ,
D y
F
0.6 MPa
] I Q
It/i-@-'-]
1
,
,,,
,
L .....
'I.3MPa
,
i
',
L
1 1
[ Fig. 6-11. Distillation unit. 1 whole unit, 2 column, 3 boiler, 4 condender, 5 throttling of steam, F feed, B bottom product, D distillate
The distillation unit, with standard arrangement, serves for separation of C 3 - C 7 hydrocarbons. The reflux ratio equals 1.3. The t h e r m o d y n a m i c analysis is
rather tedious; we shall give only the results, summarized in Tab.6.2. Tab. 6-2. Exergetic analysis of distillation unit (TO= 298 K) region entropy production (kW/K)
1
1.299
loss of exergy (kW)
387
%
100
2
3
4
5
0.510
0.040
0.604
O.144
-152
39.3
12
3.1
180
46.5
43
11.1
Chapter 6 - Entropy and Exergy Balances
173
The unit has been divided into four subregions, according to Fig. 6-11. Smallest is the loss of exergy in the boiler, due to the small temperature difference between boiling liquid and condensing steam. Remarkable is the relatively great loss of exergy due to throttling the steam in control valve 5. Greatest are the losses in the column proper, and in the condenser. The great loss in the column is not surprising. For a possibility of making the loss lower, it would be however necessary to analyze in more detail the function of the plates; this would require more detailed data on the process, which are, as is usual, not available. Somewhat surprising is the great loss in the condenser. It signals an imperfection of its functioning. For instance the heat transfer surface is small (thus the temperature difference great), or some inert gases are present. Observe, however, that a lower temperature difference in the condenser, thus lower condensation temperatures would mean lower pressure in the column, thus also lower temperature in the boiler, thus greater loss of exergy by throttling the supplied steam. Concerning the control valve, a pressure drop is necessary, but the existing one appears as too high. In practice, however, the pressure drop is determined by the pressure of the steam available. One could perhaps consider utilizing the given steam in an ejector: also available is steam at pressure level 0.35 MPa, thus the resulting steam from the ejector could have a sufficient pressure of 0.8 MPa. Briefly, the exergetic analysis offers certain possibilities of improvement. A more detailed analysis is, however, necessary taking into account the realistic possibilities of the plant.
6.3.3
Heating furnace
fuel ~1
"1
air vl 298 K
theoretical combustion temperature (2200 K)
298 K
3
-lmedium heated
633 K
w-
combustion gases
493 K
Fig. 6-12. Heating furnace. 1 burner, 2 combustion chamber, 3 heat exchanger, 4 fictitious cooler
The furnace serves for heating crude oil from temperature 220 deg C to 360 deg C. The fuel is methane, with excess of air 10 %. The unit has been formally divided into burner, where only mixing of inlet streams takes place, combustion chamber, heat exchanger, and a fictitious node that represents cooling
174
Material and Energy Balancing in the Process Industries
the combustion gases to the ambient temperature. For the latter, see Example 2 of Section 6.2, formula (6.2.13). For the remaining nodes, see in particular Example 8 of the previous section. Thermodynamic data for the analysis are available in standard tables. Entropy production and loss of exergy are computed per 1 mole of the fuel. The results are summarized in Tab. 6-3. Tab. 6-3. Exergetic analysis of heating furnace (TO= 298.2 K) Node
1
2
3
4
Total
Os (J mol-lK -1)
28.2
808.0
688.8
95.6
1 620.6
28 506
483 209
5.9
100
ToQs (J mol 1 ) %
8417 1.7
240 906 205 380 49.9
42.5
Greatest are, as can have been expected, the losses in nodes 2 and 3. In the combustion chamber, the loss is due to the irreversible chemical reaction. In the heat exchanger, it is the heat transfer under high temperature gradient. Alas, the possibilities of rationalisation are quite limited. Using the 'latent chemical energy' in a fuel cell is, at the present state of the technology, quite unrealistic. At most, one could lower the excess of air for the combustion; the computation shows that some 2 % of the overall loss could be saved. In the exchanger, one could lower the temperature gradient if some high-temperature cooling medium were available, such as liquid metals. This possibility is rather hypothetical as well. Moreover, another problem would arise: how to use further the hot medium. In the end, the furnace serves for preheating crude oil rather than the heat exchanger for cooling the combustion gas. Only the last item (see node 4) suggests indirectly some possibility: one can make lower the outlet temperature of the combustion gases if they are used for preheating the inlet air for combustion. The computation shows that for instance lowering the outlet temperature to 160 deg C would decrease the fuel consumption by 6.8 %. But such idea can arise without any exergetic analysis. The result only supports the general statement made in Example 8 of the previous section. The loss of exergy by irreversible chemical reactions, such as combustion reactions, is enormous. The theoretical possibility of exploiting better the chemical energy of fuel in electrochemical cells is, of course, known for years; only technologically, the problem has not been solved so far.
Chapter 6 6.4
-
Entropy and Exergy Balances
175
CONCLUDING REMARKS
Quite formally, an exergy (or entropy) balance can be set up if thermodynamic and process data are available. It contains always one unknown, viz. the loss of exergy (or entropy production), and cannot be solved if some of the other data are lacking. Even this fact can give rise to problems in practice. From the process data, for instance the temperatures at heat transfer surfaces are frequently unknown and can only be estimated; other data are known only indirectly, as a result of mass-, chemical components-, and energy balancing. Frequently lacking are such thermodynamic data as partial specific (or molar) entropies (or chemical potentials) for components of nonideal mixtures. If we have stated in Chapter 5 that an energy balance is never exact in practice, this holds true the more for the entropy. Suppose we have overcome these difficulties; most probably we shall succed at least in exergy balancing of (thermodynamically) simple systems such as heat exchanger networks. Then what inference can be drawn from the result. Supporters of the exergy -based methods have introduced a number of 'exergetic efficiencies', and published computer programs for their evaluation and use in optimisation algorithms. Less known are, however, examples of such use in industrial practice. For heat exchanger networks, the method can even appear as inadequate; see the above example 6.3.1. [Quite frequently occur the exergetic concepts in considerations of global (regional, nation-, or even worldwide) character, when looking for an optimal strategy of production and use of energy; such considerations lie beyond the scope of this book.] In spite of the somewhat hesitating conclusions, our aim was not perhaps to deny the possibility of exergy-based analysis at all. For instance in the case of separation processes, some information can be drawn even from a simple model, as shown above. Another problem is, how the information is further used. One should always bear in mind that the underlying ideas are rather simplistic, going back to the traditional, past-century's concepts of Camot cycles, semipermeable membranes (in case of diffusion processes), reversible cells, and the like. Their role in the development of thermodynamics is incontestable. But in their rudimentary form, they hardly can stand as a base of contemporary engineer's reasoning, however sophisticated be the methods of computation. Thermodynamic analysis goes back to the priciples. Its results (as well as those of any other formal analysis) can prove useful as a part of the whole set of informations the engineer needs for making decision at a creative level. The decision requires critical consideration of the whole set. Alas, there is no computer program for making the decision.
176 6.5
Material and Energy Balancing in the Process Industries
RECOMMENDED LITERATURE
A survey of exergy-based methods and the underlying theory can be found in a monograph by Fratscher et al. (1986). On the same philosophy is based an earlier work by Fratscher and coll. (1980) dealing in particular with separation processes. More generally, thermodynamic theory applied to energy conservation and economy is expounded in Kenney (1984), the pinch technology (ICI-Leeds Approach) included in Chapter 10. For the latter, see also Linnhoff and coll. (1982). Fratscher, W., V.M. Brodjanskij, and K. Michalek (1986), Exergie, Theorie und Anwendung, VEB Deutscher Verlag fur Grundstoffindustrie, Leipzig Fratscher, W., and coll. (1980), Energetische Analyse von Stoffiibertragungsprozessen, VEB Deutscher Verlag ftir Grundstoffindustrie, Leipzig Kenney, W.F. (1984), Energy Conservation in the Process Industries, Academic Press, New York Linnhoff and coll. (1982), User Guide on Process Integration for the Efficient Use of Energy, The Institution of Chemical Engineers, Pergamon Press, Oxford
177
Chapter 7 SOLVABILITY
AND
CLASSIFICATION
OF VARIABLES
I
LINEAR SYSTEMS
In Chapter 3, we have met with a special type of linear balance equation (3.1.6), thus Cm = 0, with vector variable m and constant matrix C (reduced incidence matrix of graph G). Another example of a set of linear equations is (4.5.9a and b), provided the splitting ratios aj obeying (4.5.9c) have been a priori fixed as certain constants (or if no splitters are present). In this chapter, we shall deal with a general set of linear equations, making use of linear algebra only and without introducing any special structure. For mass balance equations, an alternative to the graph methods of Chapter 3 is thus presented. The reader is recommended to peruse Sections B.1-B.8 of Appendix B when necessary so as to brush up his knowledge of linear algebra, and also for the notation and terminology.
7.1
GENERAL~ANALYSIS
A set of linear equations in variables (say, zn ) c a n be written in condensed form as Cz + c = 0 .
(7.1.1)
Here, z is column vector of components zn in number N, ordered by convention as z~, ..-, ZN. Having assigned an order also to the (scalar) equations, if their number is M then C is a given M x N matrix, and c is a given M-vector. If c = 0 then the equation (7.1.1) is called homogeneous. The necessary and sufficient condition of solvability (existence of some solution) is clearly c 9 ImC
(7.1.2)
where ImC is the image of matrix C; in particular a homogeneous linear equation is always solvable (by z = 0). According to (7.1.2), the vector c is a linear combination of the column vectors of matrix C, hence the rank of the extended matrix (C, c)equals (say) M' = rank(C, c) = rankC (5 M).
(7.1.3)
1'/8
Material and Energy Balancing in the Process Industries
We regard Eq.(7.1.1) as a set of constraints the variable z has to obey, thus as (a part of) the model of some physical (technological) process. So if the condition (7.1.2) is not obeyed then the model is simply wrong, having no solution. Let thus the condition be satisfied. If we have M' < M then certain (M-M') rows of matrix (C, c), thus certain scalar equations are linear combinations of the remaining M' ones, and can be deleted. This done, the matrix of the new system is of full row rank. In what follows, let us suppose that linearly dependent equations have been deleted a priori, hence assume rank(C, c) = rankC = M .
(7.1.4)
The matrix C being of type [M, N], by (7.1.4) we have M < N. If M = N then the M x M matrix is regular (invertible) and the solution z = -C-~c is unique. The analysis is then complete. More interesting is the case when M < N.
(7.1.5)
Then the set of solutions z is infinite. Indeed, if z 0 is some solution then the general solution equals z = zo + v
where
v ~ KerC
(7.1..6)
is arbitrary in the null space of matrix C; of course when c = 0 (homogeneous equation), we can take z 0 = 0. The dimension of the null space equals dimKerC = N - M .
(7.1.7)
Let M be the set of solutions, thus z~
Mmeans
Cz+c=0;
(7.1.8)
it is thus the set of vectors (7.1.6). In mathematics, such set is called 'linear affine manifold'; the number N-M is called the dimension of M. See Fig. B-2 in Section B.5 as an example. Another example is the equation z~ + z2 + z3 - 1 = 0, where Mis thus a plane in 3-dimensional space; if we add the equation z~ - z2 = 0 then M is a straight line. Alas, geometric imagination fails when considering less trivial examples. We shall now generalize the analysis presented in Sections 3.2 and 3.3. We suppose again that the values of certain variables Zn have been fixed as (say) + Zn ; they can have been measured or be otherwise known, or also prescribed as some target values. See the first paragraph of Section 3.2; we only replace mj by Zn. Formally, making again abstraction from how the values Z+n have been
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
179
d e t e r m i n e d , w e d e c o m p o s e the set o f variables in the m a n n e r that ( h a v i n g r e - o r d e r e d the indices) v e c t o r z is p a r t i t i o n e d y )
} J
unknown
x
} I
fixed
z=
(J+I=N)
(7.1.9)
w h e r e x i s / - v e c t o r o f the fixed c o m p o n e n t s , y that o f the r e m a i n i n g J (= N-/) ones. T h e partition (7.1.9) c o r r e s p o n d s to the partition o f m a t r i x C
}
C=(B,A) J
M.
(7.1.10)
I
H a v i n g fixed x = x + Eq.(7.1.1) reads
By + Ax § + c = 0.
(7.1.11)
W e thus h a v e a g a i n the e q u a t i o n (7.1.1) w h e r e n o w y stands for z, B for C, and Ax++ c for c. T h e solVability c o n d i t i o n n e e d not, h o w e v e r , be satisfied with an arbitrary x § We have rankBT = rankB = L (say)
(7.1.12)
hence, the transpose B T being of type [J, M], dimKerB T = M - L'.
(7.1.13)
The null space KerB T is a vector subspace of the whole space R Mof M-vectors. Let us have M-L linearly independent vectors (transposed row vectors) txTh e KerB T (h = 1, ..., M-L), thus a basis of KerB r. The basis can be completed by some L linearly independent vectors, say BT k (k = 1, "", L) to a basis of II M. Then the matrix
L =
where L' = L'
and L" = I~M-L
(7.1.14) BL
is M x M regular, its rows being linearly independent. We have L"B / LB =
L'B
where L'B = 0
(7.1.15)
because BTct~ = 0 thus t~B = 0 for h = 1,..., M-L. Because LBy = 0 if and only if By = 0, we have KerB = Ker(LB) thus rank(LB) = J - dimKer(LB) = J - dimKerB = rankB. Hence
Material and Energy Balancing in the Process Industries
180
the L (= rankB) nonnull r o w s g k B of LB are linearly independent, thus rank(L"B) = L is full row rank. Consequently the equation L"By + b" = 0 has some solution y whatever be L-vector b". Thus in particular the equation LBy + L(Ax++ c) = 0, equivalent (L being regular) to the equation (7.1.11) and rewritten in the form L"By + L"(Ax§
c) = 0
and (0 +) L'(Ax*+ c) = 0 is solvable if and only if L' (Ax++ c) = 0. If it happens that L = M then the second equation is absent, and B being then of full row rank, we have no additional condition of solvability. Summarizing, we have the following result.
Let rankB = L and let 1~1' " " ' O~'M-L be linearly independent row vectors such that ctTh ~ KerB T (thus o;h B - 0 ) f o r h - l, . . . , M-L. Then the equation (7.1.11) has some solution y if and only if A ' x § + c' = 0
where
A' = L ' A , c' = L ' c (7.1.16)
and where L 9 = IDa,M_ L
I f in particular L = M then Eq.(7.1.11) has always some solution in y. The transformation of Eq.(7.1.11) in the above manner is called matrix projection. Instead of finding explicitly a matrix L ' having the required property, we can proceed as shown in the next section. Also the analysis presented in Section 3.3 can be generalized. W e shall use the same terminology. Irrespective of the way how the value x + of the subvector x has been actually fixed, we call its components m e a s u r e d , and those of y u n m e a s u r e d . If z' and z" are two vectors (7.1.9), the components of z' resp. 9 9 tl |I z" are y j and x i resp. y j and x i . Let us suppose that some i-th measured variable has the following property: W h a t e v e r be two solutions z' and z" of Eq.(7.1.1), if Xh -- X~ for all h ~e i then also x'i = x'~. Then the i-th variable is called r e d u n d a n t : its value is determined by the other measured values. Let us further suppose that some j-th u n m e a s u r e d variable has the property: W h a t e v e r be two 9 I1 solutions z' and z" of Eq.(7.1.1) such that x' - x", we have y j - y j . Then the j-th variable is called observable" its value is uniquely determined by the m e a s u r e d values, provided they make the equation solvable. Let a h be the h-th column vector of matrix A. If ah = L'a h = 0 then by (7.1.14), T T ah ~l =
0~'1 a h =
0,
T T " " , a h O~M_L =
0
thus, the vectors
T
T
ct 1 , ... , CtM_L c o n s t i t u t i n g
a basis of
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
181
KerB T, we have aT W = 0 for any w ~ KerB T. Consequently, the property L'a h = 0 is independent of the choice of the basis, thus of matrix L'. Thus conversely, if a'i = L'ai ~: 0 then the inequality holds again whatever be the choice of L'. Now a'i is i-th column vector of matix A' in the condition (7.1.16). If a'i :~ 0 then some element A'li (in l-th row) of matrix A' is nonnull, and by the solvability condition, the i-th component x~ is uniquely determined by the values of the other components whenever Eq.(7.1.16) is solvable. Hence the i-th variable is redundant. On the other hand if a~ = 0 then A'~h= 0 for all I and the h-th variable is unaffected by the condition (7.1.16), thus arbitrary, thus not redundant. W e thus h a v e the f o l l o w i n g criterion.
The i-th measured variable is r e d u n d a n t if and only if the i-th column of matrix A ' in (7.1 . 16) is n o n n u l l . The condition is independent of the choice of L', thus of the basis of K e r B T. a 'i= L '
ai
T h e d e f i n i t i o n o f a r e d u n d a n t v a r i a b l e thus d e p e n d s o n l y on the m a t r i x (B, A), n o t on the v a l u e x +. A m e a s u r e d v a r i a b l e that is n o t r e d u n d a n t is c a l l e d nonredundant.
I f it is the h-th v a r i a b l e t h e n the c o n d i t i o n r e a d s a~, - 0 w h e r e a~,
is the h-th c o l u m n v e c t o r o f A ' . If in p a r t i c u l a r L = M, w e h a v e no a d d i t i o n a l c o n d i t i o n , thus n o r e d u n d a n t nonredundant. Summarizing
variable,
and
all the m e a s u r e d
If L = M:
all m e a s u r e d v a r i a b l e s n o n r e d u n d a n t
IfL <M,
a'i ~ 0:
i-th v a r i a b l e r e d u n d a n t
a~ = 0:
h-th v a r i a b l e n o n r e d u n d a n t
where
A
variables
are
(7.1.17)
= (a'l, .-., a I )
is the m a t r i x L ' A in ( 7 . 1 . 1 6 ) . Let x § be such that Eq.(7.1.11) is solvable. Then, if y' and y" are two solutions of the equation we have B(y" - y ' ) = 0 thus y" - y' ~ Ker B. The matrix B operates on J-vectors u of j-th component uj. If, for some j, the subspace KerB contains some vector u such that uj ~ 0 then, setting y" = y'+ u, we have YI~~ Y~ and the j-th variable is not observable, being not uniquely determined. Conversely if u ~ KerB implies uj = 0 for the j-th component then y"- y' ~ KerB implies yj = y~ and the determination of yj is unique. Observe also that if L is an arbitrary M x M regular matrix then Ker(LB) = KerB hence the above condition is independent of the transformation. W e thus h a v e the f o l l o w i n g result.
The j-th unmeasured variable is o b s e r v a b l e if and only if for any J-vector u
Material and Energy Balancing in the Process Industries
182
Bu=0
implies uj = O
(7.1.18)
where uj is the j-th component of u. The criterion is independent of possible transformation replacing matrix B by some L B where L is regular M x M matrix. T h e d e f i n i t i o n o f an o b s e r v a b l e v a r i a b l e thus d e p e n d s o n l y o n t h e m a t r i x B in t h e p a r t i t i o n ( 7 . 1 . 1 0 ) , n o t p e r h a p s on t h e f i x e d v a l u e x +. A n u n m e a s u r e d v a r i a b l e t h a t is n o t o b s e r v a b l e is c a l l e d u n o b s e r v a b l e .
From (7.1.18) follows
The 1-th unmeasured variable is u n o b s e r v a b l e if and only if there exists some J-vector u such that Bu = 0
and l,lI q~
0 .
(7.1.19)
T h e a b o v e c r i t e r i a c a n b e r e w r i t t e n in a m a n n e r that will b e u s e f u l in C h a p t e r 8. Let us have an arbitrary M x J matrix B of column vectors bj (j = 1, ..., J), let rankB = L. If Bu = 0 implies uj = 0 for the j-th component of any vector u = (u~, ..., uj )r then, whatever be J numbers u~, ..., uj J
Z ujbj = 0
implies uj -- 0
(7.1.20)
j=l
because the LHS equals B(u~, ..., uj )v. Hence, if ~j) is the vector space generated by the remaining J-1 column vectors b~ (i ~: j), for any w e ~i) abj+bw=0
impliesa=0
thus bj ~ ~0" Consequently, because the space ImB of dimension L is generated by ... , bj, we have
bl,
dim ~i) = L - 1 .
(7.1.21)
Conversely, if (7.1.21) holds true then bj ~ ~i) and we have (7.1.20). Hence the statements (7.1.21) and (7.1.20) are equivalent. Observe that anyway, dim%) > L- 1. Further, we have dimKerB v + L = M
(7.1.22)
because B x is J x M and rankB ~ = L. Let us have two M-vectors w' ~ ImB, w " r
KerB T .
If, for some real a and b
(7.1.23)
Chapter 7 -
183
Solvability and Classification of Variables I- Linear Systems
aw' + bw"= 0 then, as w ' = B u for some J-vector u, 0 = a B T B u + bBTw '' = a B T B u hence also 0 -- a u T B T B u = a ( B u ) v (Bu) = a w ' T w '
thus if w ' r 0 then a = 0. Consequently, if w' resp. w" is some basis vector of ImB resp. KerB v, the two vectors are linearly independent. Thus according to (7.1.22)
(7.1.24)
ImB + KerB v = 11M and (ImB) n (KerB r ) = {0} ; the two subspaces are
supplementary in
R M.
Going back to the partition (7.1.10), let ai be a column vector of A. If the M-vector at is element of ImB then, whatever be ~ (h = 1, ..., ~h
ai
M-L) in
(7.1.14), we have
= 0; thus
(7.1.25)
for a~ ~ ImB: L ' a t = 0 . On the other hand, if a i ~ ImB then, by (7.1.24) a i --- w ' + w" for some w ' ~ ImB, w" ~ KerB r, w" r 0 hence w " T a i = w " T w '' :~: 0
because, for some u, w"Tw ' = w'Tw '' = (Bu)Tw '' = UT BTw" = 0. Consequently, because w" is linear combination o f certain vectors r r (7.1.14), we have r L ' w " r 0. Thus (as L ' w ' = 0)
r 0 for some Oth , hence
(7.1.26)
ai ~ ImB implies L ' a i ~: 0 .
We thus have the following results. The i-th measured variable is redundant
i f a i ~ ImB
nonredundant
if a i E ImB
(7.1.27)
where a~ is the i-th column vector of matrix A. Thus the i-th measured variable is nonredundant if and only if the i-th column vector a i of A is a linear combination of the columns of B. Further, the j-th unmeasured variable is observable
if dimVo~ = L-1
unobservable
if dimV~) = L
}
(7.1.28)
184
Material and Energy Balancing in the Process Industries
where %~ is the space generated by the remaining J-1 columns bj, (j'~ j) of matrix B. Thus the j-th unmeasured variable is unobservable if and only if the j-th column vector bj is a linear combination of the remaining J-1 column vectors. Recall that we have denoted L = rankB.
7.2
(7.1.29)
C A N O N I C A L F O R M A T OF THE SYSTEM OF E Q U A T I O N S
Let us consider a general linear equation (7.1.1). Having re-ordered and partitioned the variables according to (7.1.9) with (7.1.10), the extended matrix reads C~x = ( B , A , c ) } M . J
I
(7.2.1)
1
The Gauss-Jordan elimination on the set of scalar equations (7.1.1) corresponds to a regular linear transformation of matrix Cex. The transformation consists in forming linear combinations of the rows of Cex, their re-ordering included. Let us, however, proceed in two steps. In the first step, the elimination is restricted to matrix B. So the linear combinations are performed with the rows of the whole Cex, but using only the columns of matrix B in the elimination. The transformed matrix is thus of the form J
I
1
B"
A"
c"
}L
0
A'
c'
} M-L
Fig. 7-1. Transformation of matrix Cox
where L = rankB. In the second step, the elimination is carried out on matrix (A', c'). The transformed matrix is generally I
1
A'1
c',
} M'-L
e'2
}m-m'
,,.
0
Fig. 7-2. Transformation of matrix (A', c')
185
C h a p t e r 7 - Solvability and Classification of Variables I- Linear Systems
If c 2 ~: 0 then the equation is not solvable. There is an error in the model, which has to be found and the problem re-formulated. This done, with the new equation we have c2 - 0 if M - M' > 0, or simply M - M' = 0. Because now rank Cex = M', if M > M' then some M - M' equations are linear combinations of the remaining equations and can be deleted, or we can start from the transformed matrix, where the zero rows have been deleted. For simplicity, let us assume directly that M = M'; hence the transformed matrix is that in Fig. 7-1, and Cex is of full row rank. We are thus in the situation considered in Section 7.1. The equivalent system of equations after the transformation reads B"y + A"x + c" = 0 A ' x + c' = 0
(L scalar equations) ( M - L scalar equations).
t (7.2.2)
According to the scheme (B.7.3) in Section 7 of Appendix B, the elimination includes the selection of certain variables yj, (h = 1, -.., L) such that the elements Bkj, of matrix B" equal 1 for k = Jh, zero for k r Jh ; recall that in Fig. 7-1, we have used only the columns of matrix B for the elimination. For a better visualisation, let us thus re-number the components of subvector y in the manner that the selected variables stand as 1-st, ..., L-th. Denoting by I L the L x L unit matrix, the matrix B" is then of the form (I L , B*) where possibly certain, say L0 rows of B* equal zero_ Let us further rearrange the rows of B" in the manner that the L 0 zero rows of B* stand as 1-st, ..., L0-th; then also the rows of matrix I L are re-ordered. We thus finally re-order once again the variables corresponding to the first L columns so as to have again the unit L • L matrix in the first L columns of B". So finally, after re-ordering the rows and re-numbering the variables, the matrix B" reads
B (iLo Lo
o/, 0 IL_Lo
B*
L-L o
J-L
} L-L o
where rankB" = L
(7.2.4)
and where for any row Bh* of matrix B* we have Bh ~: 0 (h = 1, ..., L - L o) .
(7.2.5)
Here, we have precluded the case that L0 = L but J - L > 1. Indeed, in the latter case some J- L columns of B" equal zero. Recalling the elimination, we conclude that also the J - L columns of the original matrix B then equal zero and the corresponding components of vector y are, in effect, absent in the linear model (7.1.1) with (7.1.9 and 10).
186
Material and Energy Balancing in the Process Industries
We also know that (having possibly deleted zero rows after elimination in the second step) matrix A' is of full row rank, hence rankA' = M - L .
(7.2.6)
If there are zero columns in matrix A', say in number I0, on renumbering also the I components of vector x we obtain
A'-(A*,O)
} M-L
(7.2.7)
I-Io Io where (7.2.8)
rankA* = M - L and where for any column a *i of matrix A* we have
(7.2.9)
ai ~ : 0 .
The final format of the extended matrix of the equivalent system (7.2.2)
Lo
L-Lo
J-L
1-1o
Io
1
I
L-L o
M-L
y
I observable
II unobservable
v ' - -
III redundant
IV nonredundant
Fig. 7-3. Canonical format of matrix of linear system (7.2.3) (The verbal classification is explained below)
Chapter 7 -
187
Solvability and Classification of Variables I - Linear Systems
where the void fields are zeros, and where we have the conditions (7.2.5) and (7.2.9). We call it the canonical format of the extended matrix; to be more precise, one should also add the zero rows according to Fig. 7-2. Observe that one of the groups I and II of columns can be absent, and also group IV of columns can be absent. We can also have M = L, in which case the last M-L rows are absent. A special case is when z = x in (7.1.9), in which case subvector y is absent and the first L rows are also absent. The wording 'canonical' will be explained below. Let us now go back to Section 7.1. Consider first the special case where all the variables are qualified as measured, thus formally J = 0 hence also L = 0 by definition, in accord with L < J. The matrix B" in (7.2.2) is absent, as well as the columns I and II and the first L rows in Fig. 7-3. If the group IV of columns were nonempty, certain columns of the original matrix A would be zero, thus the corresponding variables would be absent in the model. Precluding this case, the group IV is always empty. Then all the measured variables are redundant by (7.1.17) where we can put A' = A. Let further J > 0 thus L > 0 (else B would be zero matrix). Then Gauss-Jordan elimination on matrix B has been carried out, and we have the canonical format according to Fig. 7-3. If we imagine, for a moment, that the columns in both subsets of unmeasured/measured variables are (separately) re-arranged into the original orders then the transformed matrix (that of the system (7.2.2)) equals LCcx where L is some M x M regular matrix; see Appendix B, (B.8.28). Here, Cox is the matrix (7.2.1) where we have directly assumed that C~x is of full row rank M. Decomposing L")}L L =
L'
} M-L
(7.2.10)
as corresponds to the decomposition (7.2.2), we have in particular L ' B = 0, L'(A, c) = (A', c ' ) .
(7.2.11)
Here, the M-L rows of L' are linearly independent and B T L 'v = 0; hence if oth (h = 1, ... , M-L) is h-th row of L', we have Br0~hr = 0 thus CtTh e KerB r.
Consequently, our transformation is just one of those admitted in (7.1.16). Although we have not needed computing the matrix L explicitly, formally the transformation to canonical format is a matrix projection, according to the terminology introduced after formula (7.1.16). Only the variables have been re-numbered to obtain the arrangments (7.2.3 and 7). Let us first examine the columns III and IV in Fig. 7-3, thus the matrix A' (7.2.7). Let L < M (else the matrix is absent). Then by (7.1.17), the group III of columns represents the redundant variables, the group IV the nonredundant ones. In the total, we thus have I-I o redundant variables. Each of them separately
188
Material a n d Energy Balancing in the Process Industries
is uniquely determined by the remaining ones as a component of vector x § obeying the condition A'x + + c' = 0. More generally, we can select a subset of H linearly independent columns of A', thus after rearrangement, matrix A' reads
A' = ( A ; , A ; )
(7.2.12)
H where clearly, the columns of A'~ are in the group III. Then, if the corresponding + + subvectors of x + are Xl and x 2 , the condition of solvability +
~
+
~
A~ x~ + A 2 X 2
+
"- 0
(7.2.13)
determines uniquely the subvector Xl+, given x2+ such that the condition has some solution. The (full row) rank of A' being M-L, we have necessarily H < M-L and taking H = M-L, this number is maximum. Then, taking arbitrary I-H components of x~, x~ is unique. Observe that the choice of the H linearly independent columns is generally not unique (but also not arbitrary; some columns of A' can be linearly dependent). The maximum number M-L of linearly independent columns is called the degree of redundancy. In accord with this definition, if in particular L = M then, according to (7.1.17), all the measured variables are nonredundant. In that case, we do not partition the measured variables in Fig. 7-3, set formally I 0 = I and consider formally the group III empty. Let us now examine the matrix B" (7.2.3). If u is a J-vector, we have Bu = 0 if and only if B"u = 0; see the fine-printed paragraph preceding the criterion (7.1.18). W e will apply the criteria (7.1.18 and 19). By (7.2.3), B"u = 0 is equivalent to ul = 0 f o r l =
1, ... , L 0
(7.2.14a)
J-L
ULo+h + t__Z113~tUL+t = 0 for h = 1, ... , L-L o
(7.2.14b)
where ght is the t-th component of the row vector 13~ (h-th row of B* ). We see immediately that by (7.2.14a), all the first L0 unmeasured variables (group I) are observable. Let further the j-th column be some of the first L-L o columns in group II, thus j = Lo+k where , 1 < k < L-Lo. Recall that Bk ~ 0 thus B~v ;e 0 for some v (1 < v < J-L). Thus setting ul = 0 for l = 1, ... , L o Uj - " U L o + k - "
1
1 -
u,§
B~v
UL+t = 0 f o r U L o + h -- -
1 < t < J-L , t 4: v
1 , ~ B h, v f o r h ~ : k Bkv
C h a p t e r 7 - Solvability a n d Classification o f Variables 1 - Linear Systems
189
as the reader readily verifies, all the conditions (7.2.14) are obeyed. Thus the j-th variable is unobservable. Finally let the j-th column be some of the last J-L columns in (7.2.3), thus j = L+v where 1 < v < J-L. Then, setting ul = 0 for l = 1, --- , L 0 Uj =
UL+ v =
UL+t = 0 f o r
1 1 < t < J-L, t # v
ULo§ = - 8~ for h = 1, .-., L-L o we see immediately that again, the conditions (7.2.14) are satisfied. Thus the j-th variable is again unobservable. Consequently, all the J-L o unmeasured variables of group II are unobservable.
We have thus completed the classification. The group I of columns represents the observable variables, the group II the unobservable ones. In this manner, the canonical format of the extended matrix enables one to identify uniquely the following invariants of the given linear system (independent of the admissible equivalent transformations). (i)
The solvability in variable z of Eq.(7.1.1); the unsolvable case is not considered in Fig. 7-3 (see Fig. 7-2)
(ii)
The rank of matrix C = (B, A); in Fig. 7-3, full row rank M is assumed, otherwise some zero rows occur in addition
(iii)
The rank L of matrix B, with the partitions (7.1.9 and 10)
(iv)
The degree of redundancy (say) H = M-L
(v)
The partition of measured variables into redundant (columns III in number I-Io ) and nonredundant (columns IV in number I o ), where the group III is empty if M = L
(vi)
The partition of unmeasured variables into observable (columns I in number L 0 ) and unobservable (columns II in number J-L o ).
Note that generally, the partition of columns II as drawn in Fig. 7-3 is an ad hoc partition, not an invariant; using another elimination procedure, another partition of the variables could be obtained (only the numbers J-L and L-L o are invariant). Also the matrices B* and A* depend on the way of elimination. In addition, we have the equivalent set of equations (7.2.2). Given x = x § we have to check the condition of solvability A'x + + c' - 0 and if not satisfied, first adjust the value x+; if it is the vector of actually measured values, it means the reconciliation (see Chapter 9). If the condition is obeyed then the observable
190
Material and Energy Balancing in the Process Industries
unmeasured variables are uniquely determined by (7.2.2)1 ; in particular if J = L (B is of full column rank) then all the unmeasured variables are uniquely determined. Remarks
(i)
Comparing with the graph analysis in Chapter 3, we find certain common features of both methods. Having decomposed graph G O into connected components, we have merged the nodes in any of the components. This corresponds to summations of subsets of rows in the full incidence matrix, in the manner that certain rows of submatrix B are annulled. The result is the system (3.2.4) of equations. Clearly, the matrix A* is that obtained generally in (7.2.7), and the I 0 variables of group IV are represented by the flowrates mi where i a J' (3.2.6). The first K' vector equations (3.2.4) are further transformed according to (3.3.1 and 2). Irrespective of the way of computing the inverses Rk = (B~,)-1, the result (3.3.2) is the same as by a Gauss-Jordan elimination. The zero rows of matrices Rk B~ thus uniquely correspond to the zero rows in the last J - L columns of matrix B" (7.2.3) and identify the observable variables (flowrates associated with arcs i e Sk ). Hence, as has to be expected, the classification by both methods is identical. See the example in Section 3.4. By (3.4.1), the variables m2 and m~ are nonredundant thus m2+ and m +l~ are arbitrary. The remaining measured variables have to obey the conditions (3.4.7), else the vector m § has to be adjusted to some fla. Then the unmeasured variables must obey the conditions (3.4.10), as commented in the last paragraph of Section 3.4.
(ii)
We have not rewritten the matrix A', thus A* in (7.2.7) as would correspond to a Gauss-Jordan elimination, giving unit submatrix in certain columns. The variables in the latter columns would represent certain components of a 'maximal' subvector x~ in (7.2.13), with H - M - L in (7.2.12). The choice of the columns is generally not unique. One can also imagine the case where some row of the matrix A* is zero in all the columns with the exception of one thus A* reads, after rearrangement i0
/1 0
0A** ) .
But if io is that column then our condition reads, with c' - (Cl
(7.2.15)
,'",
~
T
CM-O
Chapter 7 - Solvability and Classification of Variables I- Linear Systems X +i0 - - -
c~'
191
(7.2.15a)
hence the i0-th variable is uniquely determined as a constant of the model. (iii)
According to the fine-printed remark following after formula (7.2.5), we do not consider the case where some column of matrix B equals zero. In the linear model, this means that the corresponding unmeasured variable is simply absent. Formally, it can then be regarded as unobservable according to the classification (7.1.28). With a (linearized) nonlinear model, such possibility can incidentally occur at some point z since B as a function B(z) depends on z (see Chapter 8).
(iv)
The canonical format can be further specified using a special strategy of elimination. See Section 12.2 of Chapter 12.
7.3
COMMENTARY AND EXAMPLES
Let us return to Section 7.1 and let L < M in (7.1.12). Hence the condition (7.1.16) applies. As shown, the choice of the basis vectors ~T ~ KerB v is arbitrary. This can be verified directly. Taking some other M-L basis vectors, say ~,T, any ~,T is a linear combination of the former vectors, thus also any row vector 7h is such linear combination, thus the new matrix (say) L'~ replacing L' equals L'~ = Z L '
(7.3.1)
where Z is some regular (M-L) • (M-L) matrix. [Indeed, if Z were of lower rank than M-L then also L'1 would be of lower rank.] The new condition thus reads Z ( A ' x § + c') = 0 and is equivalent to the former condition. The set of solutions (in x +) of Eq.(7.1.16) is thus independent of the choice of L'. Let M § be this set, thus x~
M§
(7.3.2)
and the condition of solvability reads x+ ~ M + .
(7.3.3)
In the same manner as in (7.1.8), M § is again a linear affine manifold, of dimension I-(M-L), and determined uniquely by the linear system (7.1.1) with the partition (7.1.9). In fact, M § is the projection of M (7.1.8) into the subspace of vectors x. This means that
192
Material and Energy Balancing in the Process Industries
x ifand~176176
(7.3.4)
For example if we have two scalar equations y-x~-x
2+ 1 =0 (7.3.5)
2y-
x 1 +2
2 -
1-0
then 914is a straight line in the space (y, Xl,
X2), viz.
y=2t X 1 --
(7.3.6)
3t
x2=l-t with parameter t. Given 21 and 22 , they have to obey the condition of solvability (21,22)x ~ M+ thus, by elimination 2~ + 322- 3 = 0
(7.3.7)
which represents a straight line in the plane (x~, x2), parametrized as x~ = 3t and x2 = 1 - t. The straight line M + is the projection of the straight line 914 into the plane (x 1 , x 2 ).
!
.x~~ Fig. 7-4. Projection M §
~ x 2
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
193
If x + is a vector of actually measured values, we have generally x + ~ M § due to measurement errors. The reconciliation starts from the condition ~,~ M + ( 9 , = x + + v ) ;
(7.3.8)
v is the adjustment obeying certain additional conditions derived from statistics. Given ~,, the first subset of equations (7.2.2) reads B"y + A":~ + c " = 0
(7.3.9)
where rankB" = L. Again, the set of solutions y is a linear affine manifold, of dimension J-L (a unique point if L = J), but dependent on i. Let M (~) be this set, thus
y ~ M(~)
means
/y/
~ M
(7.3.10)
thus
B"y + (A"~ + c") = 0
if ~ ~ M §
(7.3.10a)
while
M(~) = O
if :~ ~ M + .
(7.3.10b)
Observe that the linear equation (7.3.10a) is (B" being of full row rank L) solvable in y for any value of :~; but only with the condition ~, ~ M +, it is equivalent to the full condition (7.3.10), thus also independent of the choice of matrix L in (7.1.14), i.e. also of the way of elimination according to Section 7.2. Generally, if vector z is partitioned as in (7.1.9) then the subset of M where the x-components (coordinates) have been fixed (thus x = :~) is called section of M at x = :~. Thus our M(~) is the projection of the section into the subspace of y-components, according to (7.3.10). Clearly, if the section is empty (thus if i ~ M +) then also its projection M(i) is empty. In the above example (7.3.5), fixing :~ ~ M + means fixing a point on the straight line M + in the (x~, x2 )-plane. Then the straight line x~ - ~ , x2 = x2 parallel to the y-axis in the space (y, x~, x 2 ) intersects the straight line M in one point; if taking some ~, ~ M + then the intersection is empty. The intersection is (say) point G, x~, x2 )v and M(~) is a one-element set, thus point ~ on the y-axis. For instance in Fig. 7-4, taking ( ~ , X2 )T = (3, 0) T E M +, the vertical line parallel to the y-axis is drawn; then ~ = 2. If we have only one scalar equation Y~ - Y2 - x + 1 = 0 (x measured)
(7.3.11)
194
Material and Energy Balancing in the Process Industries
then M i s a plane in the space ( Y l , Y2, X) and the equation is solvable whatever be the choice of x =2; the projection M + of the plane into the x-axis is the whole x-axis. Fixing some 2 means adding the condition x - 2 - 0 to the equation (7.3.11), thus finding the intersection of M with the plane x = 2 parallel to the ( Y l , Y2 ) coordinate plane. The intersection is a straight line and its projection M(2) into the (y~, Y2 )-plane is the straight line Yl
- Y2 -I- ( 1 - ~ )
- 0 .
Alas, even the simplest example where both M § and M(~) are some nontrivial subsets of the x- and y-space, respectively, requires four variables at least. Let us for instance substitute yl+Y2 for y in (7.3.5). Then the condition of solvability is again (7.3.7), thus M + is again a straight line in the (x~, x2 )-plane. M is now a twodimensional linear affine manifold in fourdimensional space. Taking :~ ~ M +, the intersection of the subset of vectors (Yl, Y2, x~, x2 )v such that x~ = ~ and x2 = ~2 are fixed, with M is empty. If ~ ~ M + then this intersection is the set of vectors (y~, Y2, ~ , ~2 )v such that (7.3.12)
Yl + Y2 + (1-~1-&2) - 0
for instance according to the first equation (7.3.5); the second equation, provided that (7.3.7) is obeyed, is equivalent. M(~) is a straight line in the (Yl, Y2)-plane, whose equation is (7.3.12). The excursion into 4-dimensional space has only shown that it is necessary to rely upon linear algebra, while geometric imagination fails. Let us consider three equations Yl - Y2
- X1
Yl - Y2 - Y3 +
---- 0
X l "1- X2 -I- X 3 -
-Yl + Y2 + Y3 + xl +
X2 - X3 -
1
= 0
1
= 0.
(7.3.13)
As the reader readily verifies, the rank is full (M = 3) while the rank of submatrix B is L = 2, with the notation (7.1.10 and 12). Hence the solvability condition reads Xl + x2 - 1 - 0
(7.3.14a)
while the variable x 3 is nonredundant. The set M + in the (Xl, x2, x3 )-space is a plane
195
C h a p t e r 7 - Solvability and Classifi'cation of Variables I- Linear Systems
X3
plane ,/It' +
.k
s S
9
s
s
s
s
9
s S
9 9
s
9
9
X2
Fig. 7-5. Special form of the set 914+ with nonredundant variable x3
parallel to the x3-axis. Given ~, e M +, the solutions in y are subject to (L =) 2 equations Yl -
Y2
-
21
=
0
- Y3 + 221 + 22 + 23 - 1 - 0
(7.3.14b) .
(7.3.14C)
Notice that ranging the equations in the order c, b, a, multiplying Eq.c by -1, and taking the y3-variable as first we have the canonical format of the equivalent matrix of the system. Thus, in accord with direct inspection, the variable Y3 is observable, Yl and Y2 are unobservable. Taking for instance Xl = 1 thus 22 = O, and 23 = 0 the equations read =1
Yl - Y2 Y3
-1.
Thus M(~) is a straight line parallel to the ( Y l , Y2 )-plane, but not to any of the latter two axes. Due to the latter fact, the variables y~ and Y2 are not observable. See Fig. 3-8 in Section 3.3 where (x, y, z) stands for (Yl, Y2, Y3 )" Again, the example was at the limit of what one could imagine geometrically; the whole 3-dimensional manifold in 6-dimensional space lies beyond our imagination.
196
Material and Energy Balancing in the Process Industries
We did not need the sophisticated terminology of linear affine manifolds, projections, and sections in the above analysis of solvability. The formal mathematical language is, however, useful when one attempts to analyze the problem rigorously in a nonlinear case.
7.4
MAIN RESULTS OF CHAPTER 7
A linear system occurs not only in the mass balance according to Chapter 3, but also always when a nonlinear system is linearized in some step of a numeric solution procedure. The solvability analysis of linear systems brings no theoretical problem and is fully practicable by the methods of linear algebra; see Section 7.1. The general linear equation (7.1.1) thus Cz + c = 0 is called solvable when there exists some z satisfying the equation. Here, z is the N-vector of unknowns, C a constant M x N matrix, and c a constant M-vector. The condition of solvability, given matrix C, concerns the vector c (7.1.2 and 3). Assuming the condition fulfilled and having eliminated linearly dependent equations we obtain the regular linear model Cz + c = 0 where rankC = M < N (matrix C[M, N])
(7.4.1)
according to (7.1.4 and 5), precluding the trivial case where C is a square regular matrix thus z =-C-~e the unique solution. The model represents a set of constraints the components of vector variable z have to obey. The set of solutions has been denoted by 9V/(7.1.8). Assuming that certain variables thus/-subvector x of vector z is fixed, we partition z according to (7.1.9) into J-vector y (J = N-/), and x. Accordingly, the matrix C is partitioned (7.1.10) into B [M, J] and A [ M , / ] and the model reads By + Ax + c = 0
(7.4.2)
where we put x = x + (7.1.11) as the fixed value. By the same convention as in Chapter 3, we call the subvector y unmeasured and x measured, while x + is thus the vector of given (measured) values. Given some x = x +, Eq.(7.4.2) is generally no more solvable in the unknown y. The new condition of solvability can be T T formulated using the matrix projection (7.1.16). If rankB - L and ~ , ... , o~M_L are arbitrary vectors constituting a basis of the null space KerB T, we multiply Eq.(7.4.2) by the (M-L)x M matrix L' of rows ~1, "'" , ~M-L; then, with A' = L ' A and c' = L ' c the necessary and sufficient condition of solvability reads, for a general x = x +
Chapter
7 -
Solvability and Classification of Variables I- Linear Systems
A ' x + c' - 0 where rankA' = M - L = H (say)
197 (7.4.3)
is full row rank. If in particular L = M (H = 0) then the condition is absent and x = x + is arbitrary. In the latter case, if in addition L = J (thus B is square regular), we call the solution y thus the whole vector z ~ M just determined by the measured subvector. More generally, if H > 0 then the choice of x = x + is not arbitrary, and if L < J then the solution in y is not unique. The classification of variables enables one to decide which of the variables x i (components of x) is, perhaps, still arbitrary thus must be determined a priori so as to determine a unique solution (a 'nonredundant variable'), and which of the variables yj (components of y) is, having satisfied the solvability condition, perhaps still uniquely determined by the given x (an 'observable variable'). It will be shown later (in Chapter 8) that generally (for a nonlinear system), such a verbal classification is somewhat vague. For a linear system, it can be precisely formulated and the classification based on the partition C = (B, A) only, not on the particular choice of x - x +. We call a measured variable xi redundant if its value is uniquely determined by the other neasured variables and the solvability condition, else nonredundant. There are H (redundant) variables xi at most whose values are simultaneously determined by the other measured variables' values; the number H is called the degree of redundancy. We further call an unmeasured variable yj observable if it is uniquely determined by x obeying the condition of solvability, else unobservable. The classification criteria are (7.1.17) and (7.1.18), from where also (7.1.19). The classification criterion (7.1.17) requires a matrix projection to obtain some matrix A' (7.4.3), but is independent of the particular choice of the transformation (matrix) L'; whatever be such L ' A = A' = (a'1 , -.., a I ), if a i :r 0 resp. a'i = 0 then xi is redundant resp. nonredundant, and if H = 0 then all the measured variables are nonredundant by definition. The criterion can also be formulated directly as independent of the transformation (projection) of (B, A), according to (7.1.27): If the original A = (a~, ..- , a I ) then x i is nonredundant if the column vector a i is a linear combination of the columns of matrix B, else redundant. The classification criterion (7.1.18) with (7.1.19) depends on matrix B only: If the j-th component of any J-vector u obeying Bu = 0 (thus u ~ KerB) equals zero then yj is observable, and if there exists some u e KerB such that its j-th component uj r 0 then yj is unobservable. An equivalent formulation of the criterion is (7.1.28): The j-th unmeasured variable yj is unobservable if the j-th column vector bj of B is a linear combination of the other J-1 columns, if not then yj is observable. Thus clearly, if a measured variable x i is redundant resp. nonredundant then including the variable in the list of the unmeasured ones ('deleting the i-th measurement'), it becomes observable resp. unobservable; and vice versa, for an unmeasured variable yj added to the measured ones.
198
Material and Energy Balancing in the Process Industries
The arbitrariness of the above matrix L' makes possible to replace the theoretical construction (using a basis of KerB T) by Gauss-Jordan elimination; see Section 7.2. By a procedure described in the section and leading to the final arrangement according to Fig. 7-3, we obtain the canonical format of the matrix of the system (7.4.2). The extended matrix (B, A, c) can be transformed into equivalent form
(B, A, c) ~
B" A" A' 0
c" ) c'
J
1
I
} L
where
} H
rankB" = rankB = L rankA' = H
(7.4.4)
by Gauss elimination only, without re-ordering the components of y and x. This is a matrix projection, without computing the transformation matrix explicitly. By the way, suppressing the requirement (7.4.1) of regularity, we obtain generally some M-M' (with M' = rankC) rows in addition; if some of the rows is nonnull then the model (7.4.1) is not solvable, if the rows are null then they can be deleted and we can again start from the matrix (7.4.4). Then, by Gauss-Jordan elimination and with a reordering of the variables yj (thus of the columns of B), we obtain transformed matrix B" (7.2.3)
J-L0 B"
ILo 0
~
0
0
IL_L0B*
} Lo
with 131 r 0 for each
} L-L o
row 131 of matrix B*
(7.4.5)
where lz is generally Z x Z unit matrix. Simultaneously, matrix (A", c") is transformed. Further, re-ordering the variables xi (columns of A) we obtain re-arranged matrix A' (7.2.7) A'~
(
A*,0
I-Io Io
)}H
with a i ~ 0
for each
column a i of matrix A* (7.4.6)
(and of course also re-arranged matrix A", transformed before simultaneously with B"). We can directly imagine the new matrix of the linear system as written in the form (7.4.4) with (7.4.5 and 6); we then have the canonical format (Fig. 7-3). We here suppose that no column of the original matrix B was null. As summarized at the end of Section 7.2, before Remarks, the canonical format determines certain invariants of the linear system (7.4.2). For the solvability in z (of Cz + c = 0) and for the regularity (7.4.1), see above (absence of linearly dependent equations). Then the invariants are the number H (degree
Chapter 7
-
Solvability and Classification of Variables I- Linear @stems
199
of redundancy) with the partition of measured variables into I 0 nonredundant and I-Io redundant (possibly I 0 = 0, and I = I 0 if H = 0), and the rank L of matrix B with the partition of the unmeasured variables into Lo observable and J-L o unobservable (possibly L0 = 0, and J = L0 if L = J). Of course if J = 0 (all variables measured) then no elimination (matrix projection) is necessary and z = x, C = A = A', c = c' in (7.4.3) for a regular linear model. If J > 0 then (if H > 0) the nonredundant measured variables correspond uniquely to the last I 0 columns in (7.4.6), and the observable unmeasured ones to the first L 0 columns in (7.4.5). See also Remarks (i)-(iv) to Section 7.2. The solvability analysis and variables classification are translated into more formal mathematical language in Section 7.3, with illustrative examples. The formalism is an introduction to that employed in the theoretical analysis of nonlinear systems (Chapter 8). Generally, the set of solutions of a linear (vector) equation constitutes a 'linear affine manifold', such as M above (solutions of Cz + c = 0). The vectors x obeying the solvability condition (7.4.3) form manifold M § (7.3.4), independent of the particular choice of the matrix projection (elimination). Given some ~ ~ M § the vectors y obeying (7.4.2) with x = :~ form manifold M(~) (7.3.10).
7.5
RECOMMENDED LITERATURE
The method of matrix projection was introduced, in the context of balance equations, by Crowe et al. (1983). The observability/ redundancy classification criteria were clearly formulated also by Crowe (1989). The transformation of the set of linear equations to canonical format was presented in Madron (1992), Section 4.2, and in special form with more details in Madron and Veverka (1992). Crowe, C.M. (1989), Observability and redundancy of process data for steady state reconciliation, Chemical Engineering Science 44 2909-2917 Crowe, C.M., Y.A. Garcia Campos, and A. Hrymak (1983), Reconciliation of process flow rates by matrix projection, AIChE J. 29, 881-888 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Madron, F. and V. Veverka (1992), Optimal selection of measuring points in complex plants by linear models, AIChE J. 38, 227-236
This Page Intentionally Left Blank
201
Chapter 8 SOLVABILITY
AND CLASSIFICATION
OF VARIABLES
II
N O N L I N E A R SYSTEMS
When also chemical components and/or energy are included in balancing, the system of equations is generally nonlinear. From the mathematical point of view, the analysis then brings numerous problems not completely resolved so far. In practice that means that a method of solution (involving possibly reconciliation of measured data) can fail; the reader perhaps knows from his own experience that this is not an uncommon case in numerical mathematics, when treating nonlinear problems. Along with the (unavoidably incomplete) analysis and classification, our aim is to illustrate what can be the reasons of such failure. The topic is a matter of further research. To the best of the authors' knowledge, the material presented in this chapter is largely quite novel. We have, therefore, at least outlined also certain rather lengthy mathematical proofs. They are fine-printed and the results summarized for a reader not interested in details. The reader is anyway recommended to peruse Sections A.1-A.4 of Appendix A and B.1-B.8 of Appendix B, and of course Chapters 3, 4, 5, and 7.
8.1
SIMPLE EXAMPLES
Let us consider blending of two streams (1 and 2) of mass flowrates mj, mass fractions y~ of k-th component, and temperatures Tj . Possibly, the blending unit includes a heat exchanger; for convenience and in contrast to the general notation in Chapter 5, let Q be the heat withdrawn (Q < 0 if heat is supplied). Stream 3 is the output stream. Q
2
T "- 3 r
-q Fig. 8-1. Blending of streams
202
Material and Energy Balancing in the Process Industries
If we have two components in the mixture, we can determine the composition by the mass fraction of one selected component, thus 3) in stream j. Pressure P is considered constant and known, thus the thermodynamic state variables are yJ and T j in stream j. The set of balance equations reads m~
+ m2
- m3
m l y l + m2y2 _ m 3 y 3
= 0 = 0
(8.1.1)
ml hi + m2h 2 - m 3 h 3 - Q = 0 where hj ( = / T with the notation introduced in Section 5.1) is specific enthalpy of j-th stream, a given function of 3~ and T j, given P. We assume m~ > 0 and m 2 > 0. Then the nonlinear system (8.1.1) in variables mj, 3;, T j (j - 1, 2, 3), and Q is solvable: taking arbitrary values of m~, m 2 , yl, y2, T 1, T 2, Q the solution reads m 3 = m I + m 2 (> 0)
(8.1.2)
thus y3 =
(m 1yl + m2y2 )
(8.1.3)
( m 1 h 1 + m 2 h 2- Q)
(8.1.4)
ml+m2
and with h3 =
m~+m2
the RHS is given function of the above variables, where y3 follows from (8.1.3), and there remains to resolve the equation in unknown T 3 /_~(T3; y3 ) = h 3
(8.1.5)
with (by hypothesis known) specific enthalpy function/4. Here, given y3 the specific enthalpy is increasing function of temperature, thus T 3 is uniquely determined. Let us, however, precise the latter point. The mass flowrates mj are subject to the only condition mj > 0 .
(8.1.6)
For the mass fractions, we suppose 0 < yJ < 1 .
(8.1.7)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
203
But taking for instance yl = 0 or y~ - 1 the stream 1 is, in fact, a single-component one and the problem is modified; yl is no more a variable of the process. Let us rather adopt the condition 0 < 3~ < 1
(8.1.7a)
thus 3~ has to lie in an open interval. Then, if (8.1.7a) holds for j - 1 and 2, it holds also for j = 3 by (8.1.3), as is readily shown formally. We suppose of course T j > 0 (absolute temperature). But the enthalpy function is continuous within certain limits where the medium does not change its state of aggregation; also the technological process admits some range of temperatures only. When necessary, the heat withdrawn (or supplied) allows one, by (8.1.4), to maintain the h3-value, thus the solution T3 of (8.1.5) in these limits; imagine mixing of water with concentrated sulphuric acid. Generally, in the system of balance equations we suppose a priori that the variables' values are restricted to certain intervals, thus to a multidimensional interval in the whole variables space. The enthalpy function/q is assumed to be infinitely differentiable (imagine a polynomial expression). Then, as can be shown formally, the solutions (8.1.2 and 3) and that of (8.1.5) with (8.1.4) are infinitely differentiable functions of the (chosen) 'independent variables', in number 2 + 2 + 2 + 1 = 7 for 3 'dependent variables' (our solutions). The special partition of variables into 'independent' and 'dependent' as chosen is not critical. The set of equations (8.1.1) can be written as g(z) = 0 (z ~ U)
(8.1.8)
where g is an (infinitely differentiable) M-vector of functions (M = 3), z is the vector of N (= 10) variables mj, 3~, T j, Q, and U is the multidimensional interval of admissible values. The equation is solvable, thus the set M of solutions is nonempty. The fact that the general solution can be found as (infinitely differentiable) function of N-M (= 7) variables (components of z) is expressed, in mathematical language, by saying that M is a 'differentiable manifold', of dimension N-M. It is called the solution manifold of the system (8.1.8). Another example of solution manifold is the linear affine manifold (7.1.8). The dimension (N-M) is, in less formal language, the number of degrees of freedom of the system, thus the 'number of independent variables'. In the example, in accord with the intuition, it equals the number of variables ('dimension of the problem') minus the number of equations ('constraints'). Such set of constraints can be called regular; see later for a precision. It is to be stressed immediately that not any N-M (= 7) variables can be chosen as independent; for example including the three variables ml, m2, m3 among the seven independent ones is erroneous, because they are subject to the condition (8.1.2).
204
Material and Energy Balancing in the Process Industries
The simple picture changes when some of the variables (components of z) are fixed, for example as measured values. Generally, if Zn is the n-th component of z, let Zn be a fixed value. Let us examine the solvability conditions; they read generally z e 914(solution manifold) with certain fixed values Zn" In the system (8.1.1), for example with fixed mass flowrates one of the solvability conditions reads (8.1.9)
/'h 1 -I- /'h 2 - /'~'/3 - - O .
Let us rewrite the system (8.1.1) as m 1
+ m2
= m3
m l (yl_y3)
+ m2 (y2_ y3 )
- 0
m l(hl-h 3)
+ m 2(hz-h 3)
-Q
(8.1.10)
and let us consider less trivial examples.
Example 1 Let us have measured the mass fractions 3: and temperatures 7j, thus also the specific enthalpies hj are known. Let also Q be known, for example having measured the mass flowrate and inlet-outlet temperatures of the cooling (or heating) medium. Then the conditions read, having eliminated the variable m 3 m, Q~l_~3 ) -I- m 2 (~2_~3) _ 0 m, (~,_~3) + m2 (~t2_~t3) _ Q and
(8.1.11)
m~ >O, m 2 > O . The inequalities correspond to the general condition z ~ '// in (8.1.8). For example if it happens that ~ = ~3 then, by the inequalities, we have also ~2 _ ~3 as a solvability condition; precluding this case, the inequalities imply only (.~l_y3) (~2_~3) < 0
(8.1.12)
because m~/m2 > 0, hence the algebraic signs of the differences must be different. Suppose the inequality is satisfied. If now Q , 0 then the solvability condition reads ~'-/93 )(ktz-kt3 ) ~ (.92-~3 )(h'-kt 3 ) for 0 ~ 0
(8.1.13)
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
205
(linear independence). Let also this condition (inequality) be obeyed. Then the equations are uniquely solvable in the mj. If we had for example m~ = 0 then, according to (8.1.11)~ and (8.1.12) also m 2 - 0 , which would contradict the second equation with ~) g: 0. Hence the solutions m~ g: 0 and m2 g: 0. If it happens that some of the flowrates becomes negative, our data are simply wrong (physically absurd) and such set of measurements has better to be discarded. [By the way, such case could occur as well in the solution of mass balance equations in Chapter 3.] Precluding this case, the given values determine uniquely m I and m2, thus also m 3 ( > 0 ) .
Example 2 Let further the heat exchanger be absent. Then the condition of nonnull flowrates mj reads
Q~l__~3 )(~2__~./3 ) __ Q,~2__~3)(~1__~3 )
for ~) - 0 ;
(8.1.14)
else the equations (8.1.11) have the unique solution m~ = m2 = 0. The absence of the heat exchanger means that ~) does not enter the set of adjustable values. The solvability condition then takes the form of a (nonlinear) equation. With (possibly adjusted) measured values, one of the equations (8.1.11) is eliminated. Assuming again the inequality (8.1.12), we can eliminate the second equation and by (8.1.11)1 with (8.1.2), we have the homogeneous linear system m 1 +
m2
(.91@3)ml + @2@3) m 2
- m 3 =0 =
0
} (8.1.15)
of rank 2, thus the solution manifold is a onedimensional vector space. The equations (8.1.14) and^ (8.1.15) represent a decomposition of the system (8.1.2) and (8.1.11) (with Q - 0) into the solvability condition and those for the unmeasured values.
Example 3 If we add also the variable m 3 to the set of the measured ones, the elimination of Eq.(8.1.2) by (8.1.11) subsists without modification and we arrive again at the condition (8.1.14), whatever be m 3 = rh3 . Then the set of constraints is solvable if and only if the condition (8.1.14) is obeyed, with arbitrary rh3 , and on substituting rh 3 for m 3 in (8.1.15) 1 the variables ml and m2 are uniquely determined.
206
Material and Energy Balancing in the Process Industries
There is a close analogy with the classification of variables in Chapter 7. If m 3 is not measured one would call the variables m~, m 2, and m 3 unobservable; if m 3 = rh 3 is measured then m 1 and m 2 can be regarded as observable, and m3 as nonredundant. The values of measured composition and temperature variables have to belong to the set (say) 914+ determined by the condition (8.1.14). With (8.1.12), the condition can be rewritten
~2 = ~t3 +
~ 2_~3
143
(~t~_~t3)
(8.1.16)
hence applying the same consideration as above, for example temperature ~.2 can be expressed as function of the remaining (3+2 =) 5 variables ~ , ~2, ~3, i,~, ~,2. We conclude again that 914+ is a (differentiable) manifold, of dimension 5. If compared with the linear case there are, however, also essential differences. In Chapter 7, the classification was independent of the variables' values. But now, (a)
The classification is unambiguous only if the admissible flowrates are restricted to nonzero ones and then, in addition
(b)
The solvability condition fails as insufficient when the measured variables take certain special values.
Indeed, concerning point (a), if m 3 is not measured and if we admit zero values for m~ and m2 then Eqs.(8.1.11) with Q - 0 are always solvable by m~ = m 2 = 0 thus also m 3 = 0 , and we have no solvability condition; if m 3 = rn 3 is given then the condition reads either rh 3 = 0, or (8.1.14). Concerning point (b), if for example kt1 = kt2 = kt3 then the condition (8.1.14) is obeyed identically; but if also ~1 _ ~3 then, by the requirement that m2 > 0, we must have also ~2 = ~3. In the latter case, thus admitting ~1 _ ~3, the condition (8.1.14) is insufficient and we, in fact, do not know which of the measured values has to be adjusted and which left fixed, or also according to which criterion. We then can say that admitting ~1 _ ~3 somewhere in the a priori admitted region r variables, the problem of adjustment is 'not well-posed'. In other terms, if it can happen that the mass fractions in the streams according to Fig. 8-1 are equal (or only slightly different) then determining the mass flowrates from measured concentrations is inappropriate. See Section 5.5 for another example of such 'ill-posedness'. In complex systems, less trivial cases than (a) and (b) above can occur.
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
207
Example 4 It is not easy to give simply analyzable examples that should illustrate all mathematically possible cases, and would not be technologically na'fve at the same time. As another example, let us consider again the system (8.1.1), equivalent to (8.1.10). Let us have fixed (measured) the variables yJ = (j = 1, 2, 3), T j - 7"J (j = 1 and 3), and Q = Q; thus T 2 is now unmeasured. Let us, however, admit both positive and negative values of Q; perhaps the heat-transporting medium in the exchanger can be cooler or warmer than stream 3. Then Eqs.(8.1.10) yield ^
~ 2_~3 mI =
-
(8.1.1.7)
m2
from where also m3, and
h2
= ]'/3 q-
q" ,-1-3
(f,/1 f,/3 ) .
(8.1.18)
m2
Here, kt~ and f/2 are given, and h 2 depends only on the unmeasured T 2, given also ~2; cf. (8.1.5). We assume again the condition (inequality) (8.1.12) fulfilled. Then, in the same manner as before and after the formula (8.1.8), we conclude that ml, m3, and T 2 c a n be expressed as (infinitely differentiable) functions of m 2 (> 0), thus that the set of solutions is a (differentiable) manifold, of dimension one. It is thus a curve in the 4-dimensional space of variables ml, m2, m3, T 2. It is generally a curve and not a straight line, because the dependence of T2 on m E by (8.1.1 8) is generally nonlinear. If Q 4: 0, none of the variables is uniquely determined; they are not 'observable'. But if it happens that Q = 0, the mass flowrates are again not uniquely determined, while T 2 (by h 2 ) is; it becomes 'observable', given the measured values. Let ~: be the vector of measured variables, 9V/'(~) the above manifold (curve). Thus in the special case where = 0, 91,f(:~) is a straight line parallel to the (m 1 , m 2 , m 3 )-hyperplane of coordinates. The reader can perhaps imagine variable m 3 eliminated as a 'dependent' variable, thus consider only the system (8.1.17 and 18). Because the coefficient at m 2 in (8.1.17) is positive by (8.1.12), we then have the following picture. ^
208
Material and Energy Balancing in the Process Industries
0>0v~ 0=0vc 0<0% mr
Jm
i
Fig. 8-2. Graphical representation of Eq.(8.1.18)
Approximating the specific heat of stream 2 by a constant, a similar figure is obtained with T 2 in place of h2; the curves in Fig. 8-2 then represent M(i). In the 4-th dimension, also m 3 changes linearly with the parameter m2 of the curve M(:~). We can also eliminate m~ and m 3 as dependent, and imagine only the projection into the (m2, T 2 )-plane. Then, considering also^ ~) as variable, the individual curves in Fig. 8-2 are certain sections at given Q
7~
Fig. 8-3. Curves in Fig. 8-2 with different l)
while connecting the points at given m2-coordinate, according to (8.1.18) we obtain (approximately) a straight line (assuming constant specific heat), with the
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
209
remaining measured variables fixed. The reader can perhaps imagine the whole surface in the (m2 , T 2, {))-space, generated by straight lines parallel to the (T 2, {))-plane and of variable slope 1/m 2 . The reader has, perhaps, already some idea of how different is the analysis of solvability for a nonlinear system. To the observations (a) and (b) above we have added the following
(c)
The classification of unmeasured variables can depend on the values of the measured ones.
In the example in Section 5.5, we have shown that the whole system can be considered observable with the exception of certain special values of the measured variables. On the other hand, in the last example we have shown that an unmeasured variable is unobservable (not uniquely determined) with the exception of certain special measured values. Thus in the first case, a variable is 'almost always observable', in the second case 'almost always unobservable'.
Example 5
In our simple examples according to Fig. 8-1, we have considered the graph of the technological system restricted to one technological unit (node), plus the environment node. The presence of other node balances can change the classification. To Fig. 8-1, let us add a splitter and another heat exchanger. Q
d
T
3
5 1
"1 Q" Fig. 8-4. Nodes added to Fig. 8-1
The stream 4 parameters are unmeasured. Let us have, in addition to Example 4, measured the mass flowrate m 5 = rh5 , temperature T 6 = ~,6, and heat Q' = Q' . Then the splitter balances imply
210
Material and Energy Balancing in the Process Industries
(8.1.19)
m 4 = m 3 - th 5 y4 _ ~3
T 4 __ ~" 3
(8.1.20)
and
=
T 5 _ ~-3
} thus h 5 = ~t3
(8.1.21)
further A
m 6 -- m 5 y6 (= yS) = ~3
(8.1.22)
and we have to satisfy the balance m 6 h 6 + Q' = m 5 h 5
hence the condition /'~/5 (~/3_~./6) = 0 '
(8.1.23)
where ~./6 is known, given y6 = ~3 and the measured ~r,6. The condition (8.1.23) has to be obeyed and if so, in addition the new unmeasured parameters y4, T 4, y5, T 5, m6 ' y6 are uniquely determined (observable), while m 3 and m 4 are subjected to the condition (8.1.19), but not uniquely determined (thus unobservable) because nor the earlier conditions have determined m 3 . The condition (8.1.23) involves the variables rhs, ~3, ~3, ~,-6 (while y6 _ ~3 ), and ~)'; the remaining measured variables (.~1, ~r, 1, ~2) are not affected by the condition, thus can be called 'nonredundant'. The condition as written determines, for example, {)' as function of the four remaining variables. If M § is now the set determined by the condition, by the same consideration as above we conclude that 9V/"§is a (differentiable) manifold, of dimension I-1 where I is the total number of measured variables. The reader may recall Fig. 7-5. Also now, but in a multidimensional space, our M § is 'parallel' to the coordinate axes corresponding to the nonredundant variables (such as was x 3 in Fig. 7-5), and we then have a (5-1 =) 4-dimensional manifold as projection into the subspace of the 'redundant' variables (thus rh5 , ~3, ib3, ~6, ~),), but no more 'linear' (in contrast to the straight line in Fig. 7-5). The solvability problem does not consist in the physical determination of the variables by the balances, but rather in the formal determination of the variables by certain given algebraic conditions. In the energy balance, it can well
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
211
happen that certain thermodynamic data are approximated and do not obey rigorously the conditions of full consistency. Let us assume that our two-component mixture can be regarded as ideal, thus the mixing enthalpy can be neglected; cf. (6.2.47). Then the specific enthalpy depends only weakly on the composition. If the specific heat of stream j is approximated by a constant value Cp.i characteristic of the stream, the variable ~3 (= y5 = y 6 ) is absent in (8.1.23). Then also ~3 is a nonredundant variable.
Example 6 As the last example, let us delete the measurement of m 5 and instead, let us measure m 4 - - t h 4 . Then, with the condition
~./3 ~ ~./6 and 0'~ 0
(8.1.24)
we have
ms=
~./3 ~./6
(8.1.25)
uniquely determined and if the measurement is not subject to gross errors, we have m 5 > 0. Then also m 3 --/~4 + m5 is uniquely determined, hence successively m~ and m 2 by (8.1.2) and (8.1.17), thus also h 2 thus T 2 by (8.1.18), now whatever be Q. Then the whole system is observable (all the variables are uniquely determined), and no variable is redundant. Again somewhat naively from the technological standpoint, let us admit also the value Q' = 0. In addition let Ft3 resp. ~./6 depend on ~,3 resp. ~r,6 only (see the preceding paragraph). Then (replacing rh5 by the unmeasured m 5 , with m 5 > 0) the balance (8.1.23) implies for Q' = 0:~./3 ~./6_ 0
(8.1.26)
hence ~.3 and ~,6 are subject to a solvability condition ('redundant'), the other measured variables are 'nonredundant', and m 5 , thus also m3, m l , and m 2 are unobservable; also T 2 is unobservable with the exception of Q = 0 (attention: the latter Q, the former Q'). It is thus seen that it can also happen that
(d)
Some variable can be (called) 'nonredundant' with the exception of certain special values of some other measured variables, where it appears as 'redundant'.
But such classification is misleading. If we have admitted positive as well as negative values of Q' and found (measured) Q' = 0, we in fact do not know
212
Material and Energy Balancing in the Process Industries
which of the measured values (~.3 and p6, or perhaps Q') has to be corrected; only if it were Q' , we should not know according to which condition, as m 5 is unknown in (8.1.23). Simply, the classification 'redundant'/'nonredundant' can fail. The (adjustment) problem is then again 'not well-posed'. ^
if
Let us summarize. The examples have shown that, according to the selection of measured variables and their admitted values Either (i)
The solvability condition takes the form of a system of algebraic equations (determining a differentiable manifold M § ); generally, the condition does not involve certain variables, which can be called 'nonredundant', while the remaining measured variables are 'redundant'.
(ii)
If the measured values have been adjusted so as to obey the solvability condition (to lie on the manifold M+), the unmeasured variables are subject to a condition taking again the form of a system of algebraic equations (determining a differentiable manifold M(~) where i is the vector of adjusted measured values); generally, given i some unmeasured variables are uniquely determined and can be called 'observable', while the other are not uniquely determined thus 'unobservable'. But the classification can depend on ~,; in the examples, some unobservable variables become observable at some special values of :~
(iii)
There can exist certain values in the admitted region of the measured variables, such that the solvability condition fails as an adjustment condition (the condition does not determine a differentiable manifold); then a meaningful classification of variables is not possible.
Then
Or also
In the latter case, we have called the adjustment problem not well-posed, which can be interpreted as an inappropriate selection of the set of measured variables. Still other cases than illustrated by the examples are possible. It is, alas, generally not easy to analyze the possibilities a priori.
Chapter 8 -
8.2
Solvability and Classification of Variables H- Nonlinear Systems
213
S O L V A B I L I T Y OF M U L T I C O M P O N E N T BALANCE EQUATIONS
Our aim is now to show that, under certain plausible conditions, the whole set of (mass, components, and energy) balance equations is solvable and, in certain sense to be precised, 'regular'. In the first step, the energy balance will not be considered.
8.2.1
Transformation of the equations
The case where only total mass balance is considered has been completely analyzed in Chapter 3. So let us begin with the multicomponent balances, as formulated in Chapter 4. We already know that the balances (4.5.2) with (4.5.1) involve also the total mass balance of the set of nodes as a consequence, hence the latter need not be written explicitly. Generally, in addition to the equations (4.5.2) we have introduced the conditions (4.2.14): certain components are absent in certain streams. If again K is the number of components occurring in the balances we have introduced K sets Ek (k = 1, ..., K); E k is the set of streams in which component Ck can be present. Then instead of (4.5.1), we have the expression (4.5.4). Further, some of the conditions (4.5.2c) are consequences of other conditions. We thus rewrite the set of balance equations in the following manner. We define, for any node n k = 1, . . . , K: n k (n) = - Z
Cniy~mi]M k
(8.2.1)
i~ E k
formally for any k, with some a priori given order. Then our equations read, having again partitioned the set N u of units into S (splitters) and T, = Nu - S, n e T, : D(n)n(n)= 0
(8.2.2a)
with (8.2.1), n(n) being the vector of components n k (n) s u c h t h a t component C k is present in the node n balance, further
s e S"
Z_ C~j mj = 0
(8.2.2b)
J~Js m
where J~ = Js u {j~ } is the set of arcs incident to splitter s, see (4.2.9 and 10), further s e S" y~?- y{ = 0
(j e J~, k = 1, ..., K)
(8.2.2c)
Material and Energy Balancing in the Process Industries
214
and having partitioned the set J into J' (arcs incident to some splitter) and Ju = J - J' according to (5.2.2 and 3), further conditions are K
J e Ju "k__E1YJ = 1
(8.2.2d)
and K
se
S: Z y ~ s = l ;
(8.2.2e)
k=l
the additional conditions read J
~ Ju"
Y~, = 0 for j ff
(k = 1, ..., K)
(8.2.2f)
Ek ( k = 1 , . . . , K )
(8.2.2g)
Ek
and se
S:yJk~ - 0 f o r j ~
Indeed, from (8.2.2e) and (8.2.2c) follows also (4.5.2d) for any j ~ J', and from (8.2.2g) and (8.2.2c) follow also the additional conditions (4.2.14) for j ~ J', because j~ ~ Ek if and only if Js c F_~. Then in (4.5.1), y~ = 0 if i ~ ~ . Recall that each Eq.(8.2.2a) represents K(n) - R o (n) (linearly independent) scalar equations, where R0 (n) is dimension of the reaction space in node n (Ro = 0 in a nonreaction node), and K(n) is the number of components present in the node n balance; see the commentary to (4.3.16), and also Remark (i) at the end of this section. We designate again I MI the number of elements of set M. The number of the scalar equations equals M=
Z
n~T u K
(K(n)-Ro(n))+ IsI + g ~
IJsl + IJul § Izl
K
+ X I J u n ( J - E k)[ + X k=l
s~S
X ]{j~} n(J-gk)]
k=l s~S
;
(8.2.3)
the sophisticated notation in the last sum means, for each k, summation of terms equal to 1 over such splitters s for which j~ ~ J-Ek thus Js ~ Ek, while if j~ ~ then the term equals zero. The number of variables (mass flowrates and mass fractions) equals N = (K + 1) lJ[ .
(8.2.4)
Observe that we thus formally regard as variables all the mass fractions, even if some of them are put equal to zero by the condition YJk= 0 for j ~ J - ~ , which
Chapter
8 -
Solvability and Classification of Variables II- Nonlinear Systems
215
is a consequence of the conditions (8.2.2c,f,g). The convention facilitates the formal analysis. Let us designate k - 1, "" , K:
mk
(n) = M k n k (n)
--
(8.2.5)
~, CniY~mi i~F~
and i m k --
y~ m
(8.2.6)
i
(mass flowrate of component Ck in stream i). Then, by (8.2.1)
k = 1, ..., K: m k (n) - - E
Cni m ki .
(8.2.7)
i~ E k
The case when J-F_,k ~: O in (8.2.3), thus when some component Ck is absent in certain streams by an a priori technological assumption, complicates the solvability analysis of complex reacting systems. Of course it can be assumed that the technological requirements are formulated in the manner that the system of balance equations is solvable. But it is not easy to find some general criteria of solvability used in the mathematical analysis. We shall not attempt to give a complete answer to the problem. Let us only analyze the case that will be regarded as 'regular'. Let us begin with a simple example. Let the technological system be a sulphuric acid plant as in Section 4.6, G its graph according to Fig. 4-2. Let Ck be sulphur dioxide; the subset Ek of streams is the set E 5 in (4.6.1). Restricting the graph to the arcs j e E k , we have subgraph G k [N, E k ]; N is the set of nodes, node n = 0 (environment) included, thus Gk is
J A2
AI
node 0
G Fig. 8-5. Subgraph Gk for sulphur dioxide
We see that G k contains isolated nodes D, S1, and $3. The remaining nodes and arcs form a connected graph, say G k [N k , E k ]. The subset Juk = Ju n E k is the set of arcs not incident with any splitter and containing component C k . Restricting
216
Material and Energy Balancing in the Process Industries
G k to arcs Juk and deleting the splitters makes the subgraph Guk of G k disconnected.
.-I "1
R nodes Nk'
A2
,,- node 0
nodes Nk~
Fig. 8-6. Subgraph Guk for sulphur dioxide
The subgraph Guk has two connected components; the component Nk 1 contains reaction nodes (B and R), N~k contains the environment node. The reader can himself make the reduction (restriction to E k and deletion of splitters) in the case when C k is sulphur trioxide. According to Fig. 4-2 and the list (4.6.1), he will find node S1 isolated in the first step, in the second step N~ = {B,R} and N O- {D, A1, A2, 0} (stream 13 connects D with A2). If C k = 02 or N 2 , N~ and N Owill be the same as in the preceding example (with different structures of the subgraphs), while if C k = H20, Guk will remain connected and contain the node 0. Finally if C k is elemental sulphur then Guk has nodes 0 and B, and is connected. Alas, the scheme is simplified, for example concerning the flow scheme of water and acids. Adding further streams and splitters, it can happen that the decomposition of Guk will comprise more components. Let us now try to generalize. Let again G [N, J] be the original graph, Ck some chemical component, and ~ the subset of streams as above. S is again the set of splitters, J' the set of streams incident to some s ~ S, and Ju = J - J'. We have the partition m
m
J' = w Js where Js = Js u {Js } s~ S
(8.2.8)
according to (4.2.9 and 10). Let (k = 1, ..., K) Juk = Ju ~ Ek
(8.2.9)
and Sk: set of splitters s ~ S such that j~ ~ E k
(8.2.10)
m
hence also Js c Ek; S k is thus the set of splitters where component C k is present. Then, in (8.2.7)
Chapter 8 - Solvability and Classification of Variables H. Nonlinear Systems
m k (n)
---
E
i Z Cni m k -
ie Juk
Z
_
se Sk je Js
Cnj m~, .
217
(8.2.11)
If j s Js, let us designate (splitting ratio) %
%
(0 < % < 1 )
(8.2.12)
%8 assuming of course mjs > 0. The inequalities follow from the splitter balance mj~ = E mj (mj > 0), and we have j~J~
Z % = 1.
(8.2.13)
J~Js
According to (8.2.6) with the condition y]s - y~, for j e Js, we have for s ~ S k 9m~, = ctj m~,~
(J ~ Js ) .
(8.2.14)
1 3 j - % i f j ~ Js 9
(8.2.15)
Let us define, for J ~ Js'gj = 1 ifj-Js, Then (8.2.11) reads
n~
m~s
]~ Cni mki - s ~ S T u 9, i n k ( n ) --_ i~J~
(8.2.16)
J~Js
where o f c o u r s e Cnj = 0 if node n is not adjacent to splitter s (not endpoint of any j ~ Js ), and Cnj 4 : 0 for arc j whose n is endpoint; then (see Fig. 4-1) Cnj~ = - 1 if n (~ T, ) is endpoint of Js, Cnj -- 1 if n is endpoint of j ~ J~. We shall now formulate
8.2.2
Additional hypotheses
Let us introduce the factor (subgraph) Gk [N, Ek] of G. It contains generally isolated nodes. If node n is isolated in Gk then component Ck is absent in the adjacent streams; thus mk (n) = 0 if n is isolated in Gk
9
(8.2.17)
218
Material and Energy Balancing in the Process Industries
In fact, such mk (n) does not occur in the balances (8.2.2a). Inthe (full) incidence matrix of Gk, the n-th row equals zero as n is isolated. Let N k be the remaining set of nodes. We shall a s s u m e m
0 ~ Nk (k = 1, ... , K)
(8.2.18)
hence the environment node (denoted by 0) is not isolated in G k , thus any Ck is present at least in one of the input or output streams. The hypothesis is not quite trivial. It can happen that Ck is some intermediate product that arises in some reaction node and is again fully consumed in other reaction nodes. In that case, one would expect that there were an inventory of the intermediate product. But in our steady-state models, wehave included the inventories in the environment node, thus we have still 0 ~ Nk. This assumed, deleting the isolated nodes we have subgraph Gk [Nk, Ek ] of full incidence matrix I
I
graph G,~
I I
I
J,,k
]
J'c~ Ek
:
Nuk
I I I -
Nk
Sk
Fig. 8-7. Full incidence matrix of general Gk
where the void field is zero. The void field in the left lower part of the figure_is due to the fact that the arcs of Ju, thus a fortiori Juk are none of the arcs j ~ J~, whatever be s ~ S. See (8.2.9 and 10). We thus can restrict Gk to the arcs j e Juk and nodes n ~ Nuk = N k - S k , and we have subgraph Guk [Nuk, Juk ] with 0 ~ Nuk. Generally, Guk is not connected. Let Gluk be the/-th connected component, of node set N~ and arc set Jluk. We thus have the partition L k
Nuk = N~uk ~9 l--~N~ where 0 ~ N~k
(8.2.19)
(one and only one of the components contains the environment node); thus Lk+ 1 is the number of connected components (Lk = 0 means that Guk is connected).
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
219
Summation over n e Nk~ in (8.2.16) yields, for
I_>1"(0+) E ( Z
Z CnjBj
se Sk \ je]'s ne N~
m~,s + Z m k(n)-0 neN~
(8.2.20)
because the sum of rows of the incidence matrix of a graph equals zero; here, Cni for n E N~ and i e J~k (C Juk ) are just the elements of the full incidence matrix of G~uk.Conceming the node n = 0, the summation only determines m k (0) by the remaining terms in Eq. (8.2.20), and is of no use (no balance of node 0 is set up). Hence Eq. (8.2.20) is relevant for l > 1, if L k > 1 thus if Guk is not connected. In that case, and in the above manner the integral reaction rates (occurring implicitly in m k (n)), splitting ratios otj (8.2.15), and component mass flowrates m~,~through the splitters are interrelated due to the a priori assumed absence of some components in some streams. Let us precise the point. Recall the observation after formula (8.2.16). In the inner double sum in (8.2.20), given s ~ Sk the summation concerns only nodes n adjacent to node (splitter) s via some arc j e J~. It can happen that for some l > 1, none of the nodes s e Sk is adjacent to any n e N~. This, however, means that even before deleting the splitters, no node n e N~ was connected by a path with any node n' ~ N~, because it is just the arcs j e Js (s e Sk ) that have been deleted. Then also the graph G k [N k , E k ] contains at least two connected components, one of them being a subgraph of node set N~; see Fig. 8-7 and imagine a subset of rows (~ 0) empty in the columns J' n Ek, and with just two nonnull elements in any column of J~,k (incidence matrix of G~k ). Then the sum over Sk in (8.2.20) equals zero and we must have, in case of u
1 > 1, Glukconnected component of Gk" ]~ .mk(n) = 0 . neN~
(8.2.21)
This means that the linear system (8.2.20) in variables m~,, is not generally solvable, unless the condition (8.2.21) is satisfied identically. If so, the condition (8.2.21) is added to the equations (8.2.2a). The case is conceivable but again, one feels thatthere is something wrong in the model. We then cannot have Gu~kas an isolated node in ~ [Nk, Ek ] because in that case, it would have been deleted already by the construction of Gk from Gk [N, Ek ]. Thus Ck is again an intermediate product in a subsystem, as above. We shall not examine this case and instead, we shall
Assume that n
Gk [Nk, Ek] is connected (k = 1, .-., K) .
(8.2.22)
Here, Gk is the subgraph of G k according to Fig. 8-7, comprising all the arcs j e Ek.
220
Material and Energy Balancing in the Process Industries
Then in particular for each 1 > 1 in (8.2.20), some splitter s ~ Sk is adjacent to some node n ~ N~, unless S k is empty. But in the latter case, Gk [Nk, Ek ] = Guk [Nuk, Juk ] (nothing deleted), hence also Guk is connected by hypothesis, hence L k - 0 and we have no condition (8.2.20). Let again Lk > 1. With the above observation, the inner double sum in (8.2.20) equals, for any s ~ S k
s.s .s J--J``
where n s is the non-splitter endpoint of j``, n i that of j e Js, and e(J's ) = 1 if n`` e N~, else zero (8.2.23) e(j)= 1 ifn ie N~,elsezero. Thus recalling again the observation after (8.2.16), with (8.2.15), the sum equals
(say) 7., = - e(j``) + ]~ e(/')% j~J``
(s e
SO
(8.2.24)
given k and I thus N~ in (8.2.23). Thus Eq.(8.2.20) reads
(8.2.24a)
]~ ],``m ~ + ]~ m k (n) = 0 . se Sk ne N~
Let us examine the coefficients (8.2.24), generally dependent on the ratios %. If the splitter s is 'inside' of the subset N~, of nodes, thus if all the adjacent nodes are elements of Nk~ then
(8.2.25a)
7`` = -1 + ] ~ otj = 0 j e Js according to(8.2.13). Else either n`` e N~ but not all nj e N~, then -1 < ~'s < 0
(8.2.25b)
because the incomplete sum of otj over Js is > 0 but < 1 or
n s ~ N~k but some nj e N~, then 0 < ~,``< 1
(8.2.25c)
or
n s ~ N~. and nj ~ N~ for any j, then in the latter case, however, But if it were only the first above, Gk would again not must take place for some s
~,``= 0;
(8.2.25d)
some of the preceding three cases occurs for another s ~ S k . case (all splitters 'inside') then, by the same consideration as be connected. Thus, in fact some of the cases (8.2.25 b or c) ~ Sk, given l > 1" hence some ~'s * 0 for any l > 1.
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
221
i
Assuming L k > 1 and l > 1, let thus S~ be the nonempty subset of S k , of elements s adjacent to some n 9 N~ and some n'~ N~ (thus Ys * 0), and let us generally write ~k for any k = 1 , . . . , K and 1 < l < Lk. We thus have, for m
(8.2.26)
s 9 S ~ ' - I _< ~k < 1 and ~k r 0 m
while ~k = 0 if s 9 S k - S~. For s 9 S~, we have one of the two possibilities (8.2.25 b or c). According to (8.2.24a), Eq. (8.2.20) reads (for k = 1 , - . . , K) Z Y~km~s+E m k ( n ) = 0 seSm, neN~
(8.2.27)
(1 < l < ~ ) .
The coefficients ~,, = ~sk are functions (8_.2.24) of the ratios aj obeying the condition (8.2.13); we have [Js [ > 2. For any l, as S~ ~ ;O, we have some ~sk ~ 0 by (8.2.26).
The Lk equations (8.2.27) are linear in the IS k ] variables m~, and of rank < ~ . They are not homogeneous unless the sums over N~ equal zero. We shall not examine their solvability in general; generally, they impose certain restrictions on all the variables, mk (n) and % included. We shall limit ourselves to the case when they are solvable in the variables mikef o r any k = 1, ..., K such that L k > 1; if L k = 0 (Guk connected), the condition (8.2.27) is absent. More precisely: Recalling (8.2.24) where (given k and l) y~ stands for ~k, let us introduce the matrices k = 1, ..., K" Gk = (~k) with rows 1 = 1, ..., Lk and columns s ~ S~ (8.2.28) (for some given order in each S k ). We then assume that all the matrices are of full row rank, thus rankG k = L k (k = 1,-.., K)
(8.2.29)
whatever be the splitting ratios (xj [obeying (8,2.13)] in some intervals admitted by the technology. This clearly implies
Lk < I Sk [
(8.2.29a)
as a necessary condition for (8.2.29). Denoting by mk: the/_q,-vector of components Z
n~N~
m k (n)
(l = 1, ... , L~ )
(8.2.30)
and by Uk" the [ Ski-vector of components m j~ (s ~ S k)
(8.2.31)
222
Material and Energy Balancing in the Process Industries
the system (8.2.27) reads Gk Uk + mk = 0
(8.2.32)
with (8.2.28) and (.8.2.24) where 7~ stands for ~sk. The hypotheses can be verified as follows. Let k = 1, -.., K (component C k ). (a)
Identify the subgraph Gk [Nk, Ek ], restriction of G to the streams j ~ Ek containing component Ck
(b)
Delete the isolated nodes of Gk" get subgraph Gk [Nk .Ek ]; verify if Gk is connected and if 0 ~ Nk. If so then
(c)
Partition the node set of Gk into the subset Sk of splitters, and the subset Nuk of non-splitters (including the node environment)
(d)
Delete the arcs of E k incident to splitters, and the splitters s ~ Sk; the subgraph Guk is of node set Nuk
(e)
Decompose Guk into Lk+l connected components Gluk (l = 0, ..., Lk ); if Lk = 0 then stop. If Lk > 1 then
(f)
Identify the node sets N~ (1 < l < Lk) of G~k, while N Ois determined as the node set containing node 0 (environment)
(g)
Identify the arcs j~ and j ~ Js incident to splitters s ~ Sk, where Js is the input stream to s, and find the other endpoints n s of Js and nj of j ~ Js
(h)
Identify the coefficients e by (8.2.23) (l = 1,---, Lk ) and
(i)
Taking some admissible values of the splitting ratios % (8.2.12) obeying (8.2.13), compute the coefficients ~k denoted as ~/~ in (8.2.24), for l = 1, -.. ,Lk and s ~ S k Identify matrix Gk (8.2.28)
(k)
Identify the rank of G k (e.g., by Gauss elimination), and verify the condition (8.2.29).
Recall that if, in step (e), Lk = 0 then Guk is connected and there is nothing more to verify; the equation (8.2.32) is absent.
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
223
Because Gk as function of the t~j is continuous, if its rank is maximum at some special values of the % then it is such at least in some neighbourhood of the values.
In certain cases, the hypothesis (8.2.29) can be verified directly. Let for instance L k = 1 as in the above example (sulphuric acid plant). Then Eq.(8.2.32) thus (8.2.27) for 1 = 1 reads Z ]'~km~,~ + Z m k (n) = 0 s~S k n~N~
(L k - 1)
(8.2.33)
where some 7~k, according to (8.2.26), is nonnull whatever be the splitting ratios ctj. Thus clearly, the rank equals 1 - L k and some m~,~ can be expressed as (infinitely differentiable) function of the sum over N~ in (8.2.33), splitting ratios t~j, and the other flowrates mJk~(t ~ S, t ~ S k ), if there are any. Indeed, we then have
mJs
--
_
'~slk
t~S ')(:k mJt + ]~ mk (n)) n~N~ t-4:s k
(8.2.33a)
where the ?-coefficients depend generally on the txj. Going back to Figs. 8-5 and 8-6 (Ck = SO2 ), the whole set Sk consists of one element $2. Denoting by s the splitter $2, according to (8.2.24) We have 3'~k = -1 (+ 0) = -1 and Eq.(8.2.33) reads m~ = m k (B) + m k (R) where, according to Sections 4.1 and 4.2, m k (X) equals the integral production rate of Ck by the chemical reactions in node X; in the present case the sum represents SO2 produced by burning in B minus that consumed by conversion in R. Clearly, it must equal the inlet mass flowrate of SO2 into $2. As an exercise, the reader can set up the balances (8.2.33) for the other chemical components according to the list (4.6.1) and Fig. 4-2. For Ck = N2, one will in addition set mk (n) = 0 in (8.2.33), because nitrogen is (assumed to be) nonreacting. For Ck = H20 (or S), Guk is connected (Lk = 0) and no condition (8.2.32) is formulated.
224
Material and Energy Balancing in the Process Industries
8.2.3
Independent variables
The condition (8.2.29) is not a necessary condition of solvability. Only we have limited ourselves to the cases where it is obeyed as a structural property of the graph, with the choice of the sets E k . If so, our solvability analysis can continue. _
Let us have verified the condition (8.2.29) at some special values of the o~j; then, at least in some neighbourhood of the special values, there exists a subset of columns of Gk that are linearly independent, in number ~ = rankGk. Rearranging appropriately the columns of G k , thus the components of vector Uk (8.2.31) on which the matrix operates, thus in fact the splitters s e Sk, if Uk(S) = m~, Sk = I Skl, s = 1, ..., Sk
(8.2.34)
then the vector Uk is partitioned
uk =
(8.2.35) Vk
} Sk- L k
where the first 4 components correspond to the linearly independent columns; vector Vk is absent if Sk = ~ . Accordingly, matrix Gk is partitioned
Gk = ( G~,, G~ ) Lk
(8.2.36)
Sk-L k
where G~, is L k • ~ regular, and Eq.(8.2.32) is equivalent to G~u~ + G[.' v k + m k = 0 thus to
(8.2.37)
u~ = - G~ l (GkVk + m k ) .
Thus if v k , thus the last Sk- Lk components Uk (S) = m~ are arbitrary, and if the L k components (8.2.30) of mk, thus also if the mk (n) for n e Nuk (8.2.19) are arbitrary then u~, thus also the whole vector Uk (8.2.35) is an (infinitely differentiable) function of the Sk- Lk variables m~,,, of the mk (n), and (via Gk ) of the splitting ratios ~j subject to the conditions (8.2.13) and otherwise arbitrary in a (multidimensional) interval. In addition, by (8.2.14), the remaining m~ (j e Js) are thus also functions of the above variables. Thus in the whole subsystem formed by splitters s e S k and the incident streams j e Js, the vector n
Wk of components mJk (j e Js, s ~ Sk )
(8.2.38)
is an (infinitely differentiable) function of the Sk- ~ components of Vk, of the mk (n) (n ~ Nuk ), and of the otj, say
225
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
(8.2.39)
wk = Fk (Vk, mk, or)
where o~ stands for the composed variable, say vector of components % where j ~ Js and where for each s, one of them has been eliminated by the condition (8.2.13). Recall now Eq.(8.2.16). Given k, we have decomposed graph G,k into connected components G~k (l = 0,-.. , ~ ), of node sets N~. If Lk > 1 then by the summation over n ~ N~, we have eliminated one equation for each N~ (l > 1). For l = 0, instead of such elimination we have simply considered the equations only for n , 0. Thus for each connected component, we have I N~I-1 equations left; they are, with (8.2.14), equivalent to the equations (8.2.11), considered each for n ~ N~ without the eliminated one thus in number ] NLI-1, 1 = 0,--., L k . Restricted to streams (arcs) i ~ Jluk(arc set of Guik), for each I the rows of (Cni) in number I NLI-1 constitute the reduced incidence matrix (say) C~k of connected graph G~uk, hence the matrix is of full row rank. In the same manner as in (8.2.35-37), we can identify some ([ N i l - 1 ) x (] N~ I -1) regular submatrix. Instead of m k in (8.2.37) we now have, for each I, the vector (say) m kI of I NLI 1 component s mk (n), n e N~ (minus the deleted reference node). Let us designate P~ = I N~I - 1
(l = 0, ..., L k)
(8.2.40)
and R~ = [ Jluk ] - P~
(8.2.41)
further
(8.2.42)
i i 6 Jluk Zk, . vector of components mk,
It can, however, happen that some of the G~uk is an isolated node. Then I Jluk I = 0 and I NLI = 1, thus PL = eL = 0 and the subvector z k1 is simply absent. With this exception, there then exists a partition
,
,
Xk
} Rk
0 = o , .-. ,L~)
(8.2.43)
such that the corresponding P~ x P~ submatrix of C~ukis regular, thus such that y~ is an (infinitely differentiable, in fact linear) function y~. = Z~ (x I , w k , m kI )
(8.2.44)
1. recall (8.2.38). Then also (having added the identity x k1 = x k1 ) the whole whatever be x k, vector zki is such function. Now mki is subvector of vector
(8.2.45)
ffak of components m k (n), n e Nuk - {0} where node n = 0 does not occur, and let us introduce the composed vectors
Zk --
and x k l=0,...
~
1
(8.2.46)
Xk
l=O,
... , L k
226
Material and Energy Balancing in the Process Industries
But because the union of subsets J~k is a partition of Juk ,in fact Zk is vector of components mk,i i e Juk"
(8.2.47)
the selection of the x kl depends, however, on the connected component and its incidence matrix. On the other hand, the vector m k (8.2.30) is linear function of the mk (n), n e Nuk - {0}, thus of vector m k . Thus finally, by combination with (8.2.39) we have m
u
(8.2.48)
Zk= Z k(Xk, Vk, (X, m k)
(where Zk is infinitely differentiable). The vector z k is column vector of I Jukl components. The dimension of Xk is
~e~=
/=0
~lJ~kl-
/=0
~ I N ~ I + t k + 1 = IJ~kl - INukl +Zk + 1
/=0
and the dimension of Vk is Sk - ~ ; recall (8.2.35). Hence
xk ) is a (I Juk I +Sk-[ Nuk I +l)-vector
(8.2.49)
Vk of variables (component Ck mass flowrates) m~,, appropriately selected in the set of streams j ~ E k . The result (8.2.48) holds true for any k = 1,-.. , K. Let us now consider the components mk (n) where k = 1, ... , K(n), and n e T, (set of non-splitters). Here, for convenience, we have re-numbered (given node n) the components present in the node as written. Now for any n, the K(n) components mk (n) are subject to the condition (8.2.2a) with (8.2.5), with full row rank (K(n)-Ro(n)) x K(n) matrix D(n). There remains again to select, for each n, certain (K(n)-Ro (n)) linearly independent columns of D(n) and having possibly re-ordered the columns, thus also the components n k (n) of n(n), we have the partitions
n(n) =
n'(n) ] } K(n)-Ro(n) n"(n) } R o (n)
and D(n) = (D'(n), D"(n))
(8.2.50)
from where n' (n) = - D' (n) "1D"(n)n"(n)
(8.2.51)
hence each of the K(n)-Ro (n) components of n'(n) is linear combination of the R 0 (n) remaining components. Having again added the identities n k (n) = nk (n) for the latter R 0 (n) components, we find that each nk (n) (k = 1, ... , K(n)) is linear combination of the R 0 (n) components of n"(n), with constant coefficients. Clearly, the subset of the last R 0 (n) components of n(n) is empty if the node is nonreaction, in which case n'(n) = n(n) = 0. Multiplying each n k by M k according to (8.2.5), we have m k . To the subvector n"(n) thus uniquely corresponds certain m"(n) of R 0 (n) components. Hence each mk (n) is a linear combination of the R 0 (n) components of m"(n), with constant coefficients determined uniquely by matrix D(n) and the choice of the partition. This holds true for any node n ~ T u . Let us introduce the composed vector
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
m" =
227
(8.2.52)
m"(n) n~ T u
Thus in the total, each m k (n) (n ~ T u , k = 1, .-. , K(n)) is a given linear combination of the components of m". Rearranged in another order, the mk(n) constitute vectors m k (k = 1, ... , K) in (8.2.45), where Nuk - {0 } c T,. Hence also the components of each ffak are the above linear combinations and the latter can be substituted for 1~k . Considering the totality of the relations (8.2.48), we first introduce the composed v e c t o r
Z
(8.2.53)
"-
k=l,...,K For each k = 1, .-., K, in z are comprised just the components m ki w h e r e i E Juk = Ju ('~ E k , thus where component Ck can be present. We then introduce the composed vectors
X =
and v =
Xk
Vk
k=l,...K
(8.2.54) k=l,...,K
Further, taking certain ]Js l-1 ratios % in each Js (s E S), the remaining one is determined. Let the former % constitute vector a. Then, finally, we obtain some (by the construction unique) function Z (infinitely differentiable) such that
(8.2.55)
z = Z(x, v, a , m " ) . Here, by (8.2.49)
(x /
is of d i m e n s i o n
V
g
[Juk I
k=l
+ ~: Is~lk=l
~: INu~l +K k=l
(8.2.56)
further
a is of dimension s
[Js[ - I s I
(8.2.57)
R 0 (n) .
(8.2.58)
s~ S
and
m" is of dimension s
n~ T u
228
Material and Energy Balancing in the Process Industries
The whole vector argument in (8.2.55) is thus of dimension K
o:g+
X(IJu~l
k= 1
+
Is~l)- ~ INu~l + x I J s l - I s I + x e0(~) k= 1
s~ S
n~ T,
(8.2.59)
where Juk = J, n Ek, S k is the set of splitters s such that Js e ER, see (8.2.9 and 10). Further Nuk is the node set of subgraph Guk, see the text before (8.2.19). It is thus the subset of nodes n e Tu u {0} incident with streams j e Juk, node 0 included. By (8.2.55), wehave determined the vector z of mk, i e Juk, k = 1, ... , K. In i
addition, also the m~, (j e Js, s e S k ) are determined as w k by (8.2.39), thus finally again
by the variables occurring in (8.2.55). Hence introducing the composed vector
w =
wk
(8.2.60)
k=l,...,K we can writeas well w = W (x, v, o~, m")
(8.2.61)
for some uniquely determined (infinitely differentiable) function W. In the total, the function r
F =
/z 1 W
(8.2.62)
determines the whole vector of c o m p o n e n t mass flowrates.
8.2.4
Degrees of freedom
Our intermediate result can be summarized as follows. W e have, by graph decompositions in the subgraphs G k of G restricted to streams j ~ ~ where c o m p o n e n t Ck can be present, selected certain special parameters (in n u m b e r D), such that the component mass flowrates m~, are determined as (infinitely differentiable) functions of the parameters. It is the vector function denoted as F in (8.2.62) with (8.2.55 and 61). W e have not explicitly written the function, we only k n o w that it is uniquely determined by the structures of the graphs G k , by the assumed reaction stoichiometries, and by the (not necessarily unique, but not arbitrary) selection of the parameters. W e have assumed c e r t a i n c o n d i t i o n s for this kind of solvability. The graphs are successively d e c o m p o s e d and the conditions verified by the procedure (say) P described in points (a)-(k) following after (8.2.32).
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
229
The group (say, vector) of parameters in (8.2.55) is selected in the following manner. Let first k be fixed. Then (a)
One identifies vector Uk of component mass flowrates (8.2.34), thus inlet mass flowrates of Ck into the splitters where Ck occurs, and by the partition (8.2.35), one selects subvector Vk as described, further
(b)
In the ultimate decomposition into subgraphs G~k by P:(e), J~k is the arc set of Gluk. In each (nonempty) J~k, one identifies vector Zkl of component mass flowrates (8.2.42) in streams not incident to splitters and, by the partition (8.2.43), one selects subvector x~ as described; note that for different l, the corresponding sets of flowrates are two-by-two disjoint. Then
(c)
By composition, one identifies vector x (8.2.46).
Now, in the totality of k = 1, .--, K (d)
One forms composed vectors x and v (8.2.54) of selected component mass flowrates; note that by different k, also the components of x and v represent different variables.
Then (e)
One identifies vector (or simply group of variables) ~ of independent splitting ratios % (thus eliminating one for each splitter by (8.2.13)), with the only condition of lying in a (multidimensional) interval, thus in a neighbourhood of the values used in P:(i).
Finally
(f)
For each node n ~ T u one partitions the vector n(n) according to (8.2.50), where n'(n) uniquely corresponds to some selected subset of linearly independent columns of D(n), and n"(n) is the remaining subvector, selected in this manner and further recalculated in terms of mass flowrates to m"(n) according to (8.2.5), and
(g)
One forms composed vector (8.2.52) of selected parameters m k (n).
The selections (a)-(g) determine the whole vector of parameters occurring in (8.2.55 and 61). Their total number is D (8.2.59). Now whatever be the values of the parameters, by (8.2.55 and 61) the vectors z (8.2.53) and w (8.2.60) are uniquely determined. The vector z is
230
Material and Energy Balancing in the Process Industries
composed of subvectors z k (8.2.47), each of them being that of component Ck mass flowrates for streams i ~ Juk, thus for streams not incident to the splitters and such that the presence of component Ck is admitted in the streams. The vector w is composed of subvectors Wk (8.2.38), thus of component mass flowrates through the splitters. Hence the vector composed of z and w is that of all component mass flowrates m~ (j ~ J) that can be nonnull. Given these m~,, recalling (8.2.6) we determine also, for any K
j ~ J: mj =
kZ=lm~,
(8.2.63)
where the summation is, in effect, over such k that j s Ek; we complete formally the definition of m~, by m~ = 0 i f j
~ Ek .
(8.2.63a)
In other terms, we can use the formula (4.5.10) with (4.5.5). Because each j is present at least in one ~ , mj is determined and we can expect mj > 0. We then determine also the mass fractions
yJ=,
(8.2.64)
% obeying clearly K
Z y~ = 1.
(8.2.65)
k=l
In the function F are also hidden the equations (conditions) (8.2.14) with (8.2.13) made use of in the construction. Thus, by (8.2.63 and 64), for J ~ Js" mj = ffj kEmJs = ~j mjs
Y~ _ ctj m~,~ = Y~
(8.2.66)
(8.2.67)
%mjs and
Z% =%s
j~J~
"
(8.2.68)
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
231
The choice of the aj has been subjected to the condition (8.2.12), hence mj~ > 0 makes also mj > 0. In this manner, all the 'primary' process variables occurring in the original set of equations are uniquely determined by the D parameters introduced by (a)-(g) above. Compare with the modified system (4.5.7)-(4.5.11). It is also physically clear that with a realistic choice of the parameters, we shall have indeed mj > 0 for all j ~ J. From the mathematical viewpoint, the case where some mj = 0 is possible; such point in the variables space is then 'singular', as Eq.(8.2.64) is not solvable, or has an infinity of solutions if also m ~ - 0. We shall not attempt specifying formal conditions precluding this possibility. One can say that the D 'independent parameters' represent certain D 'degrees of freedom'. Let us precise the point. Let us conversely have some solution of the system (8.22) with (8.2.1) in the variables mj and y~, (j ~ J, k - 1, .-. , K). Let us assume mj > 0 whatever be j e J
(8.2.69)
(precluding thus possible singular solutions). Then, by (8.2.66) %_
mj
(j E Js)
(8.2.70)
mj~ thus in particular the selected parameters % in (8.2.55 and 61) are uniquely determined. Further~ by (8.2.64) m~ = y~mj (j ~ J, k = 1, ..-, K)
(8.2.71)
thus in particular the selected vector parameters x and v in (8.2.55 and 60), composed of certain component mass flowrates, are uniquely determined. Finally, according to (8.2.7) we find the mk (n), thus in particular the vector m" (8.2.52) in (8.2.55 and 61) is uniquely determined. Consequently, the assignment of the N variables mj and y~, (8.2.4) to the D parameters (8.2.59) by (8.2.55 and 61) with (8.2.63 and 64) is one to one and bicontinuous (continuous along with its inverse; in fact infinitely differentiable). In this manner, the set (say) M of solutions is parametrized. Compare with the parametrisation of a straight line such as (7.3.6), or (in mathematical idealisation) of a territory on Earth's surface by geodetic coordinates (0, q0). Also in the latter case, the parametrisation is conventional (not the unique possible); for instance the zero meridian (q~ = 0) was chosen by convention. In addition, for example North pole is not uniquely assigned the q0-coordinate; also above (8.2.70), the points where mj = 0 (j e Js, thus also mjs = 0) are not uniquely parametrized.
232
Material and Energy Balancing in the Process Industries
If some parametrisation is possible, and if the set is, in certain mathematically precise sense 'smooth' then the set is called (differentiable) manifold; in the cases considered here, it is a 'submanifold' of an 'ambient space'. For the above set M of solutions, the ambient space is R N, phYSically interpreted as the N-space of mass flowrates mj and mass fractions y~,; see (8.2.4). The number D (8.2.59) of parameters is called dimension of Yff, which is a mathematically precise expression for the 'number of degrees of freedom' for the solutions of a set of equations. The proof that the set 9V/chas the required property of'smoothness' is, however, quite nontrivial. The proof is too technical to be reproduced here in detail. One has to show that the matrix of partial derivatives (Jacobi matrix) of F (8.2.62) is of full column rank D. One makes use of the fact that at constant a in (8.2.55 and 61), F is linear, and using the construction of F, that F(x, v, ~, m") = 0 implies x = 0, v = 0, and m" = 0 whatever be in the admissible region; hence the linear map (F restricted to variables x, v, m") is injective, hence the corresponding submatrix of partial derivatives is of full column rank. One then considers, in F, the rows of W (8.2.61) corresponding to the equations (8.2.14), thus m-~ = aj m~s 0" ~ Js ); by the differentiation, one obtains the corresponding rows of the Jacobi matrix. For any such row, thus for any (k, j) where j ~ Js, one multiplies by c~j the m~-row of the Jacobi matrix of W, and subtracts from the former; one considers only I Js l-1 elements j~ Js for each s as corresponds to ] Js 1-1 independent splitting ratios c~j in the subset Js of streams. One finally selects certain rows such that the corresponding submatrix in the a-columns is diagonal, of elements m~s r 0 for an appropriately selected k. This is possible under the condition mj~ > 0 whatever be s ~ S
(8.2.72)
One concludes the first part of the proof by proving that the Jacobi matrix is of full column rank. The second part of the proof makes use of the equations (8.2.63-65) transforming the variables m~ to mj and y~, under the condition (8.2.69), which implies in particular also (8.2.72). In mathematically precise language, the latter transformation is called 'diffeomorphism of manifolds', and it shows that our Yd is, in fact, a submanifold of the intersection of hyperplanes (8.2.65) over j e J.
Let us also observe that all the functions considered above are not only infinitely differentiable, but 'analytic'. Mathematicians know the precise meaning of the concept; for the reader it suffices perhaps to consider functions composed of elementary functions he knows from practice. Thus 914is, in fact, an 'analytic manifold', an expression used in Section 4.5, before-last paragraph. Before summarizing the final results, let us show that the set of equations (8.2.2) with (8.2.1) is, in certain sense, 'regular', on precising the sense; the ultimate precision follows in Section 8.4.
233
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
Let us give another expression to the number D (8.2.59). We have the partitions
(8.2.73)
k = 1, ..., K: Nuk = (N,k n T , ) u {0}
into the set of non-splitters n ~ T u contained in N,k, and the one-element set {0} (node environment), because 0 ~ Nuk for any k according to (8.2.19). Hence
K-Z k=l
IN.~I =-
~(INu~nTul
+ 1)-K)
k=l
and denoting
(8.2.74)
N~,k = Nuk n T u we have K
K-
Z k= 1
I Nu~ I =- ~ I N;k I 9
(8.2.75)
k= 1
Here, N'uk is the set of non-splitters n e T, such that component C k occurs in the node n balance. Let us introduce the numbers 5(n, k) where n ~ T u and k - 1, ..., K, such that 8(n, k) = 1 if Ck occurs in the n-th balance
(8.2.76) = 0 otherwise . In the matrix of elements 5(n, k), the number of nonnull elements equals K
z INu~l
by successive summation over columns:
k=l
Z K(n)
and by successive summation over rows:
n~ T.
where K(n) is the number of nonnull elements in the n-th row, thus of components C k occuring in the n-th balance as introduced in (8.2.3). Hence K k= 1
I N;~I = z K(n).
(8.2.77)
n~ T.
Consequently, by (8.2.59) K
D-- ~ (Ro(n)-g(n))+ Z(IL~I+Is~I)+ ~ n~ T.
k= 1
se S
IJ~l-Is
(8.2.78)
where we recall that Juk "- J, n E k and Sk is the set of splitters s e S such that Js ~ Ek thus E k . The notation is the same as in (8.2.3) Our goal is to compute the sum M + D. Because the sets Juk and Ju n (J-Ek) are disjoint, we have
Js c
234
Material and Energy Balancing in the Process Industries
IJun(J-Ek)J
+ [J,k[ = [ ( J u n ( J - E k ) ) U ( J , n E k ) [ = [ J u n J [
= [Ju[
(8.2.79)
because J, c J. We further have i
x JJ~l + Isl s~]gS [Js[ =sZSlJs u {Js}[ =s~S
because [ Us }1 = 1, hence !
xx
[J~l--KX [J~l-glsJ
s~S
(8.2.80)
seS
and since Sk is the set of s e S such that Js e Ek, while the (disjoint) union of sets {Js } n (J-E k) over s e S is equivalent to the set of s e S such that Js ~ Ek, we have
Is~l + z I {J~} n(J-Ek)J = IsI s~S
thus K
K
(8.2.81)
zls~l + z z I ~ } n(J-gk)[ --KISI"
k=l
k=l se S
n
consequently, summation of the LH-sides of (8.2.80 and 81) gives K Z [Js J, while the s~ S summation in (8.2.79) over k = 1, .-., K gives K IJu I 9Finally m
s~ S
IJsl + ILl + I s I - - ~
s~ S
I J s u {Js}l + ILl
= x IJ~[ + [Ju[ s~ S
= I JJ
(8.2.82)
Using all the numbered formulae, with summation over k in (8.2.79), according to (8.2.78) and (8.2.3) we obtain
M + D = ( K + 1)lJI .
8.2.5
(8.2.83)
Solution manifold W e can n o w summarize.
T h e set of e q u a t i o n s (8.2.2), in n u m b e r M (8.2.3) is s o l v a b l e in the i v a r i a b l e s ( c o m p o n e n t m a s s flowrates) m k ( k 1, . . . , K; i ~ J), with the substitutions (8.2.6), and w h e r e mj (j ~ J) equals the s u m (8.2.63), u n d e r the c o n d i t i o n s (8.2.18), (8.2.22), and (8.2.29); the conditions are of structural
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
235
character (determined by the graph G and its subgraphs G k ) and can be verified according to the points (a)-(k) following after (8.2.32). The conditions are sufficient, but have not been shown to be necessary; they only appear as plausible and not very restrictive. Basically, the conditions limit the arbitrariness in the choice of the subsets Ek (4.2.14). One then restricts the solution in the primary variables mj (j s J) and y~, (j s J; k = 1, ..., K) to the subset obeying the conditions (8.2.69) of positive mass flowrates. The primary variables are then uniquely determined by the m~, according to (8.2.63, 63a, 64), and vice versa. Then the set M of solutions has D degrees offreedom, where D is the number (8.2.78); in rigorous mathematical terms, M is a differentiable (in fact, analytic) manifold of dimension dimM= D
(8.2.84)
and a submanifold of the N-space of the variables mj and y~, see (8.2.4). We have, by (8.2.83) with (8.2.4) M +D =N
(8.2.85)
hence the number of degrees of freedom equals the number of variables minus the number of equations (constraints), as corresponds to what has been intuitively expected. In this sense, we say that the system of equations (8.2.2) with (8.2.1) obeying the above conditions is regular. The wording will be further precised in Section 8.4.
8.2.6
Remarks
(i)
It is the elimination of 'dependent' equations (constraints) that has made the system regular. Let us for instance replace the number K(n) in the K(n)-R o (n) scalar equations (8.2.2a) for some n ~ T u by the number K of all the components C k occurring in the whole system. According to Chapter 4, the balance will be again correctly written; a species C k not present in the node n balance is nonreacting in the node and does not affect the other component balances. Indeed, let us go back to Section 4.3. For a nonreacting species Ck, we have Vk~ = 0 for r = 1, ... , R, thus the k-th row of matrix S (4.3.8) equals zero. Then, in the matrix S O (4.3.10), having possibly re-ordered the components, the corresponding row equals again zero and is necessarily among the rows of matrix B. Hence n k is one of the components of vector n' in (4.3.12) and by (4.3.13) we have
236
Material and Energy Balancing in the Process Industries
nk = 0 for nonreacting Ck
(8.2.86)
as already stated in Section 4.3. By the way, we have thus shown that in (8.2.50), a nonreacting species cannot be represented by any component of vector n"(n) thus m"(n) in (8.2.52), and its balance does not represent any degree of freedom. It is only the reacting species that can do so, as they represent certain reaction degrees of freedom. If a nonreacting component Ck (such as component C 3 = N 2 in the example 4.6) is present in a reaction node n balance (see n = R in (4.6.2)) then the result (8.2.86) completes the balance. If it is not present (see C, = S in n = R above) then the result (8.2.86) is again correct. But according to (8.2.1) with Cn~ = 0 for all i e Ek, the result (8.2.86) is as well a consequence of the a priori assumption (definition of the subset Ek), as corresponds to (8.2.20. If replacing the K(n)-Ro(n) scalar equations (8.2.2a) by K-R o (n) equations involving also the species Ck not present we thus, in the formal scheme, generate an equation that is a consequence of the other constraints. It can be shown formally (by inspection of the above derivations) that the number D of degrees of freedom will remain unaffected. But the number M of equations will increase to (say) M' by (8.2.87)
M' - M = E ( K - K(n)) ne T~
where possibly, for some n e T u we have K(n) < K, hence the system will no more be regular; we shall have D>N-M'ifK(n)
Tu
(8.2.88)
thus if some component is not present in some node balance. The result (8.2.85) with (8.2.84) has also the following interpretation: The set of equations (8.2.2) with (8.2.1) is a minimal set of equations representing the balance constraints. (ii)
The a priori assumptions (8.2.2f and g) make the corresponding variables y~ 'observable', thus uniquely determined by the constraints. One could also delete a priori the latter variables in the list of all the variables. As can be shown formally, the number D of degrees of freedom would not be altered; only the system (8.2.-2) would be modified. We have preferred including all the equations (constraints) as written for the sake of formal simplicity, leaving possible modifications to the reader.
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems (iii)
237
Let in particular all the nodes be nonreaction (Ro(n) = 0 for any n ~ T u ), and let us admit the presence of all the K c o m p o n e n t s in any stream (E k = J for k = 1, -.., K). Imagine for example a system of distillation units. Then D(n) in (8.2.2a) is unit matrix for any n ~ T u , hence nk
(n) = 0 (n ~ T u ; k = t, . . . , K)
(8.2.89)
stands for (8.2.2a), with E R - J in (8.2.1). Introducing I Tu I x I JI matrix Cu as submatrix of C restricted to rows n ~ T , , further c o l u m n vectors
k = 1, . . . , K: Yk =
(8.2.90)
~mi/Mk
i~J of dimension l J I, and s u b s y s t e m (8.2.2a) reads
I JI x
K matrix Y of column vectors YR, the
m
C u Y = O.
(8.2.91)
The equations (8.2.2b-e) remain unaltered, and because J-E k - Q~, the constraints (8.2.2f and g ) a r e absent. In (8.2.3) we then have K(n) = K and R 0 (n) = 0, and the last two sums over k = 1, -.., K equal zero. In (8.2.78), we have again Ro(n) = 0 and K(n) = K, Juk = Ju n E k = Ju, and Sk = S for any k = 1, . . . , K. (iv)
This book deals with balancing proper, not so m u c h with more general p r o b l e m s of m a t h e m a t i c a l modeling. In Chapter 4, we have eliminated the (integral) reaction rates W~ in the node balances (4.3.2) as a priori u n k n o w n parameters. W h e n necessary, they can be c o m p u t e d according to R e m a r k to Section 4.5; see (4.5.12). In more detailed models, the reaction rates can be given functions of the other process variables and occur explicitly in the model equations. The elimination then brings no advantage and we can return to the original form of balances (4.3.2).
Recall the parametrisation of the solution manifold 5~. The last group of parameters was represented by vector m" (8.2.52), where the subvectors m"(n) were computed from vectors n"(n); see (8.2.50). In each node n ~ Tu , we thus have introduced R0 (n) parameters where Ro (n) is the dimension of the reaction space R(n). Alternatively, we can introduce directly certain R o (n) independent reaction rates Wr(n) (r = 1, ..., R o (n)) in node n e Tu . Indeed, by (4.3.2) the whole vector n(n) is uniquely determined as (linear) function of the Wr(n), instead of the parametrisation using (8.2.50 and 51).
238
Material and Energy Balancing in the Process Industries
Let us have, for each node n ~ T u , certain R o (n) independent admissible reactions (R0 (n) = 0 for a nonreaction node). We can extend the set of model variables by the reaction rates W~ (n) where n s Tu, r = 1, ..., R0 (n). The information contained in the equations (8.2.2a) is conserved when replacing each of the equations by n s T u 9n(n) -R~n)W~ (n)s~ (n)
(8.2.92)
r=l
where s~(n) are the (linearly independent) column vectors of the stoichiometric matrix. For each n e T u, we thus have deleted K(n)-Ro(n) scalar equations and added K(n) scalar equations (8.2.92); recall that the dimension of vector n(n) is K(n). The number of equations has thus been increased by K(n) - (K(n)-R o (n)) = R0 (n), and at the same time, we have R 0 (n) new variables for each n e T u . The difference 'number of variables minus number of equations' remains unaltered and equals again the number of degrees offreedom (dimension D of the solution manifold Yr and the new set of equations is again minimal. The new equations replacing Eqs.(8.2.2a)read more explicitly n~
Tu
Rn (n)
k ~ K(n)" n k ( n ) =
~Z Vkr(n)Wr (n)
r=l
(8.2.93)
where K(n) is the set of chemical components present in the node n balance (K(n) = I K(n) l). The quantities n k (n) are the sums (8.2.1), Vk~(n) are the stoichiomentric coefficients in the R o (n) independent reactions, and W~(n) are the additional variables (integral reaction rates).
8.2.7
Example
The results summarized in Subsections 8.2.5 with 8.2.6 are mainly of theoretical importance in showing that the set of balance equations (8.2.2) h a s D degrees of freedom where D = N-M (8.2.85): the set of constraints is minimal. The D independent parameters specified according to Subsection 8.2.4: points (a)-(g) represent one of the possible choices; they can be found applying a systematic procedure as described. Any mathematical model of the system must involve the balance constraints. The constraints can be used directly when measured data for an existing plant are available and have to be adjusted (reconciled); see further Chapters 9 and 10. Other kind of problems (lying beyond the scope of this book)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
239
are design and simulation problems. In order to specify some solution, the model is then completed by further equations taking into account the physicochemical processes in the nodes, such as the reaction kinetics. It is then useful to have an a priori idea of what independent parameters have to be fixed, the other being determined by the balance. The parameters are just certain degrees of freedom of the balance constraints; they can occur as independent variables in the additional equations. As an illustration, let us consider the sulphuric acid plant according to Section 4.6. The scheme contains two reaction nodes, B and R. In (8.2.2a), D(n) is unit matrix with the exception of the two reaction nodes; the components nk (n) of n(n) will now be restricted to k ~ K(n) where K(n) is the subset of chemical species actually present in the node n balance. In node n = B, component C 4 (HzO) is absent. In (4.6.5), we thus delete the C4-column and the third row corresponding to the trivial balance n4 (B) = 0. Hence
D(B) =
S
0 2
N2
SO 2 SO 3
C1
C2
C3
C5
-1
1
0
0
1/2
0
0
1
0
0
1
0
0
1
1
C6
(8.2.94)
In node n = R, components C~ (S) and C 4 (H20) are absent. Hence in (4.6.6), we delete columns C~ and C4 and rows 1 and 4 giving
D(R) =
02
N2
SO 2 SO 3
C2
C3
C5
1
0
0
1/2
0
1
0
0
0
0
1
1
C6
(8.2.95) .
From D(B)n(B) = 0 we obtain n 1(B)--
n 5 ( B ) - n 6(B)
3 n2 (B) - - n 5 (B) - 2 n6 (B) n 3 (B) = 0
(8.2.96)
240
Material and Energy Balancing in the Process Industries
and from D(R)n(R) = 0
1 n 2 (R) n 3
-
2
n 6
(R) (8.2.97)
(R) - 0
n 5 (R) =
- n6
(R)
Hence, with n k (n) =
m 5 (B), as
m 6
(B),
m 6
1
mk (n) (8.2.5), we can take (8.2.98)
(R)
independent parameters according to points (f) and (g) of Subsection 8.2.4.
We have three splitters S1, $2, $3 in Fig. 4-2. With splitting ratios ctj (8.2.12) obeying (8.2.13), as independent parameters we can further take for instance cx3 (giving 13~4 "- 1 - cx3), ~7 (giving cx8 = 1 - cx7) , and cx~6, CXl7(giving CXl5= 1
(8.2.99)
- 13~16 - 0~17 )
This is point 8.2.4:(e) Recall that using Figs. 8-5, 8-6, and the analysis that follows after the figures in Subsection 8.2.1 we have verified that the conditions (a)-(k) following after (8.2.32) are fulfilled. Indeed, the subgraphs Guk are either connected or have two connected components ( t h u s / ~ = 1); see then also (8.2.33 and 33a). If G,k is connected, the splitter input flowrates m~,~ (s e Sk" component Ck present in splitter s) are arbitrary, if ~ = 1 then some m~,~is a linear combination (8.2.33a). Let us go through k = 1, ... , 6 according to points 8.2.4: (a)-(d). The reader may himself draw the subgraphs G k and Guk. If k - 1 (C~ = sulphur) then S1 = O (no splitter in G1 ). The subgraph G~ = Gul is connected, Nul = N O = {0, B }, Jux J~ = { 11 }. Vector u 1 (8.2.35) is absent. In (8.2.40-43) we have p0 = 1, R ~ - 0 thus subvector x ~ is absent (no degree of freedom) and subvector y0 is the scalar m 111., it obeys the node B balance n
m~l'
= -
m, (B)
[ = - M, n, (B)]
(8.2.100)
with (8.2.96): elemental sulphur is totally consumed by the two combustion reactions. I l k = 2 (C 2 = 02 ) or k = 3 (C 3 = N 2 ) the subgraphs G k are identical, as well as Guk 9We have ~ = 1, Sk = {S1, $2 }. The connected component G luk with
Chapter
Solvability and Classification of Variables II- Nonlinear Systems
8 -
241
N~ = {B, R } and J~k -- { 5 } generates a linear dependence between the two input streams m k2 (into S1) and mk6 (into $2), generally according to (8.2.34-37)', for L k = 1 we have more simply (8.2.33). We can take for instance m k2
as
(k-2and3)
(8.2.101)
independent parameters. Then, by (8.2.33a) for
k - 2 and 3"
6
2
mk - mk + mk
(B) +
mk
(8.2.102)
(R)
with (8.2.96 and 97) where again m k (n) = M k n k ( n ) . It is simply the species Ck balance of the subsystem of nodes N~ - {B,R} where m k3 + m k4 - m k2 ., observe that by (4.3.1) rewritten as (4.5.1), mk (n) is the production rate of species Ck in node n, in mass units (zero for the nonreacting species C3). In (8.2.43) we have p1 _ 1 and R 1 - 0, hence subvector Xk is absent (no degree of freedom) and y~ is the scalar mk5 subject to the balance (8.2.16) thus 3
m~ - m k +
mk
(B) (k = 2 and 3) where
3
2
mk -
~3 mk
(8.2.103)
The connected component Gu~ has N o - {0, D, A1, A2} and J ~ k = { 1, 9, 10}. We o is absent (no degree of freedom) and have pO = 3 and R~ = 0 hence subvector Xk 1 mk, 9 m k~0. Because the nodes n e N o are nonreaction we yO is of components mk, have, for k-
2 and
1
2
3" m k = m k ,
9
mk -
~
6
mk,
10
mk
-
6
m k
(8.2.104)
as the reader readily verifies; the splitter outlet streams (j ~ J~) obey m~, - ~j m~?, and for mk6 we have (8.2.102). If k = 4 (C 4 - H20 ) then $4 - {$3} and Gu4 is connected (L 1 - 0), with Nu4 -- N O = {0, D, A1, A2} and Ju4 = J~ - {1, 12, 13, 18} (arcs not incident to $3). Because L~ = 0, the splitter input flowrate m414
(8.2.1.05)
can be taken as an independent parameter. In addition we have p0 _ 3, R ~ = 1, hence one of the flowrates mJ4 (j ~ J~ 4 ) can be chosen arbitrarily. Let for instance 1
m 4
(8.2.106)
be taken as an independent parameter. Then the split output flowrates are determined by the ratios ~j (8.2.99) and m414,and the remaining m~ are determined by the incident (nonreaction) node balances (8.2.16). One finds, after simple transformations
242 13 m4 =
Material and Energy Balancing in the Process Industries 14
m~ + (x15m 4
18 14 m 4 = ~16m4
(8.2.107)
1 m 412 _ (0~16 + ( ~ 17) m 4 I4 - m4
If k = 5 (C 5 = S O 2 ) then S 5 = {$2} and L 5 = 1. In G~5 we have N~ - {B, R} and J~5 = {5}. Here, in (8.2.35) we have S s - L 5 - 0 hence subvector v 5 is absent (no degree of freedom) and u 5, is just the scalar m 65 (input into $2). We already know that, by (8.2.33a) m ~ - m s (B) + m s (R)
(8.2.108)
is determined by the parameters (8.2.98) with (8.2.97). We further have P~ = 1 and R~ - 0. The only stream j - 5 ~ J~5 is determined by the node B balance thus m~ = m 5 (B);
(8.2.109)
the reader can check again that it is the balance (8.2.16). Further, in G~ we have N o = {A1, A2, 0), J~5 = {9, 10}, and the streams are determined by 9
10
m5 = (~7 m6, m5 = m~
(8.2.110)
(no degree of freedom).
Finally if k = 6 (C6 = SO3 ) then $6 = {$2,$3}, L 6 = l , and G~6 = G~5. Hence, in the same manner as above m 6 = m 6 (B) + m 6 (R)
(8.2.111)
and m~ = m 6 (B)
(8.2.112)
are determined, while the input stream to $3, not incident to any node of G]u6, can be taken arbitrarily. The reader may notice that the latter stream cannot be taken as dependent (determined) by (8.2.33a), a s ~ls6 = 0 for s = $3. Thus m~ 4
(8.2.113)
can be taken as independent parameter. In G~ we now have N O = {D, A1, A2, 0} a n d J~ 6 = { 9 , 1 0 , 1 3 , 1 8 } . We have pO = 3 and R ~ = 1, hence one of the streams j ~ J~6 can be taken as independent. Let for instance
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
m~~
243 (8.2.114)
be taken as independent parameter. From the incident (nonreaction) node balances we then obtain, after simple transformations 4 = m~8= m6 - (z17
4-
~
(8.2.115)
m 9 = m~~ - c~8 m 6 + ((Z16 + 0~17) m 14 with (8.2.111). Considering in addition that m~, = ~j m~? for j ~ J~ (output streams from splitter s) we see that all the component mass flowrates m~, are determined by the independent parameters (8.2" 98, 99, 101, 105, 106, 113, 114). Thus 9
m 5 (B), m 6 (B), m 6 (R)
(8.2.116a)
(~3' 0~7' 0~16' (Z17
(8.2.116b)
,4
14
(8.2.116c)
m4 , m6 m 41 ,
m~~
(8.2.116d)
can be taken as independent parameters (degrees of freedom) according to the systematic procedure described. The primary variables mJ
mj = Zk mJk
and
yJk =
(8.2.117)
mj
are then also determined. Formally, we add the assumptions y~, = 0 for j ~ E k thus for the streams j where component Ck is absent. An assiduous reader can verify that the number of scalar equations (8.2.2) is M = 113, the number o f variables (yJk = 0 for j ~ E k included) is N = 126, and correctly D = 13 = N-M is the number of degrees of freedom. The choice of independent parameters is not unique and can be modified. For example the concentration of sulphuric acid in stream 14 is limited by the absorption technology to a rather narrow range (some 98 wt.% of H2804, which corresponds to the SO3 mass fraction y~4 = 0.8). Instead of the parameters m414 and m~ 4 w e can take as independent
14
m14 (-" m 4 + m~4)
and
y 4(m 4) = ~ m14
(8.2.118)
244
Material and Energy Balancing in the Process Industries
thus in (8.2.116c) and
m~4 -- y~4m14
14 14 m4 - m14 - 26 m14
(8.2.118a)
are determined. The nonabsorbed quantities m 9 (from A1) and m~~ (from A2) are both small; the absorbers are designed to make them as small as possible. Considering that, by (8.2.115)3 (~17 m~ 4 -. t~ 8 m6 - (Z16 m~4 -t- m 9 - m~~
we can take, instead of the parameter 0~17 , also the flowrate m 9 as independent and determine
1
1~17 : 0~8 m~ 4 - (~16 q- m-~4 ( m ~ -
m~o
)
(8.2.119)
1 with (8.2.118a). In the group (8.2.116d), we then have m4, m~, m~~ And the like. For instance with the above modifications, the parameters (8.2.116a) are determined by the performance of the reaction nodes B and R (where m 6 (B) thus SO3 production in B can be, according to the conditions in the combustion chamber, assessed as a small or even negligible quantity); the remaining parameters a3, o~7, ~ in (8.2.116b), and also m14 (thus m~4) can be varied as process parameters (with the condition 0 < al7 < 1 in (8.2.119)), while m 41 represents the humidity of air into D. The sum m~+ m 23 represents mass flowrate of dry air into S 1; here, the ratio m~/m~ is, in fact, determined by Nature (thus by the standard composition of air, idealized as mixture of 02 and N 2 ). Having fixed the ratio a priori, we have a further constraint and the number of degrees of freedom decreases by one. - It remains to note that the technological scheme has been simplified; the example was just a simple illustration.
8.3
GENERAL SOLUTION MANIFOLD
8.3.1
Energy balance equations
In addition to the component mass balance equations (total mass balance included as a consequence), let us now consider the energy balance according to Chapter 5, thus (5.2.11). Because the balance (5.2.11b) is consequence of the total mass balance, the additional set of equations reads, by (5.2.11a) Cuhu+
C'h'+
Sfi'
Duq=0
(8.3.1a)
Oeq - 0
(8.3.1b)
= 0
(8.3.1c)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
245
with (5.2.1-7) and (5.2.12-16). In the first step, let us regard as variables the components of vectors 1~ (5.2.7) and q (components qi )" According to the consideration following after (5.2.4), let us assume rankCu = I T~ I
(8.3.2)
(full row rank) as a simplifying hypothesis; see also the fine-printed remark at the end of this subsection. We now have in addition the subset of nodes D E (energy distributors, see Remark (i) in Section 5.1). Concerning the graph GE with reduced incidence matrix D (5.2.1), let us adopt the following conventions. Given nodes n' and n" of a graph, they are called (mutually) adjacent when there exists an arc of endpoints n' and n". Then our conventions read
(a)
If some node d ~ DE is adjacent to node 0 (environment), but not adjacent to any n ~ T u then it is merged with node 0, thus deleted. [The convention is merely formal.] Any two adjacent nodes d' ~ D E and d" ~ D E are merged. Possible isolated nodes are then deleted [again merely formal convention].
(b) (c)
Consequently, any node d ~ D E is adjacent to some node n ~ T u . Compare with an analogous convention introduced for the splitters (4.2.9-10). As an immediate consequence of the conventions, for any d ~ DE we can find some arc i ~ E (net energy stream) whose other endpoint is in T u , hence with an appropriate arrangement of the set E we have the partition +1 o De
~
D~"
~
(8.3.3)
+1 matrix I' with
I D El
x
I D E[
diagonal
matrix I'
of elements
+1
or -1, and
I DE [ • (I E l - I D E 1) matrix O,". The corresponding partition of vector q reads
q' ] } rDEr q=
q"
} IEI-IDE!
(8.3.4)
and because the inverse of l'is again I', Eq.(8.3.1b) reads q'=-lo
eq .
(8.3.5)
246
Material and Energy Balancing in the Process Industries
Adding the identities qi
=
qi for the components of q", we can write
q = Q(q")
(8.3.6)
where Q is a linear map (function). Thus vector q" uniquely determines the whole q (and vice versa). According to (5.2.12 and 13), Eq.(8.3.1c) represents E I J~ ] scalar equations s~S (8.3.7)
/-~ =/Ts(s ~ S , j ~ Js)
where/T is specific enthalpy of the material in stream j. Adding the identities /~s = ~ we have h' = Hs (fis)
(8.3.8)
with I S I -vector hs of components ~
(s ~ S);
(8.3.9)
the function H s is again linear. Finally with (8.3.2), for an appropriate order of the streams j ~ Ju let us partition Cu=(
Cu~
, Cu2 ) } ITul
(8.3.10)
IWul IJul-lZul where Cul is IT u [ • ]T u I regular; it is the reduced incidence matrix (node 0 deleted) of a spanning tree of (connected) subgraph Gu. The corresponding partition of vector h u reads hu =
hul) } Iwol ha:
(8.3,11)
} IJu[-lTul
and Eq.(8.3.1 a) reads hul = - Cu~ (Cu2 hu2 + C'h' + Duq).
(8.3.12)
To (8.3.10) also corresponds the partition of vectors m u in (5.2.5) and flu in (5.2.7)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems mu =
(mul)
and flu
mu2
fin2
} IJ.l-lrul
247 (8.3.13)
hence with the notation (5.2.14) hul = (diagmul) llu~
and
hu2 - (diagmu2) flue 9
(8.3.14)
In the same manner as in Section 8.2, we shall limit ourselves to the case when, according to (8.2.69) mj>0foranyj~
J;
hence in particular the matrix diagmul is invertible. Then, by (8.3.12) with (8.3.14), (5.2.16), (8.3.8), and (8.3.6) flu1 = (diagmul)-z hu 1 where hu~
- Cul (CuE (diagmu2)fluE + C (diagm')H s (fi~) + D u Q(q"))
Adding the identity flu2 ^
^
=
flu2 we can write
^
h u - H u (m, huE, h s , q")
(8.3.16)
where m is the whole vector of mass flowrates (5.2.5); H u is an (infinitely differentiable) function of the vector arguments as written. Considering the whole vector 1] (5.2.7) of specific enthalpies/T (j ~ J) and the vector q of net energy flowrates, with (8.3.6), (8.3.8), and (8.3.16) we obtain the (infinitely differentiable) function H determining uniquely fi ) = H ( m , fluE, fis, q"). q
(8.3.17)
In the second step, we shall replace the components /T of 1] by the temperatures 7~ of the streams j ~ J. Generally, /T is function of the thermodynamic state variables
/?]J - f J ( r j, ~; PJ) (j E J)
(8.3.18)
where T is temperature of stream j, yJ represents its composition (independent mass fractions y~ of components Ck present in the stream), and PJ is pressure. We
248
Material and Energy Balancing in the Process Industries
suppose that the state of aggregation of the stream and its pressure are given (known) a priori. [Here, we neglect possible pressure drop along a pipeline through which the material flows.] We have
0f j
- c~ > 0
(8.3.19)
~)Tj J is isobaric specific heat of stream j. To be more precise, we assume that where Cp the function fJ used in the computation (not only the theoretical physical quantity itself) obeys the condition (inequality). Assuming the functions f J infinitely differentiable, conversely T j is uniquely determined by/2/j and yJ (given PJ ) as an infinitely differentiable function. As a result, the variables (8.3.20a)
7~ (j ~ J) in number ]JI and
(8.3.20b)
qi (i ~ E) in number I EI
are uniquely determined by the mass flowrates and mass fractions obeying the equations (8.2.2), and by the additional 'independent' variables Tj
temperatures corresponding to components/T (8.3.21a)
of vector ha2, in number [Ju 1-IT~ I TJs
temperatures corresponding to components/T~ of vector hs, in number
I sI
(8.3.21b)
and qi
"'" components of vector q", in number I E [ - I D E
I
9
(8.3.21c)
In Section 8.2, we have shown that the mass flowrates and mass fractions are uniquely determined by the D parameters (8.2.56-58). In order to conclude that the D former parameters plus the variables (8.3.21) represent a parametrisation of a differentiable manifold, we proceed in an analogous manner as in the fine-printed paragraphs preceding formula (8.2.73). The formal proof is again too technical, though simpler. Basically, it relies upon the fact that the functional relation (8.3.17), with temperatures substituted for specific enthalpies, comprises [Ju 1-]Tu [ identities Tj = Tj by (8.3.21a), [ S I identities Tj~= Ts by (8.3.21b), and IEI-I DE I identities qi = qi by (8.3.21c).
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
249
T h e a d d i t i o n a l e q u a t i o n s (8.3.1) are in n u m b e r
Mh= ITul + IDEI +s slJsl
(8.3.22)
a c c o r d i n g to ( 5 . 2 . 1 ) , ( 5 . 2 . 4 ) , ( 5 . 2 . 1 2 are in n u m b e r
Dh-ILl-ITul
a n d 13). T h e a d d i t i o n a l p a r a m e t e r s ( 8 . 3 . 2 1 )
+ IsI + I E I - I D o l
w h e r e , o f c o u r s e , w e c a n h a v e D E - Q5 thus
(8.3.23) I DE[ = 0. T h u s
Mh + Dh = Nh
(8.3.24)
where
ILl + IsI +
x [Jsl s~ S
+
IEI-
[JI + IEI
(8.3.25)
is the n u m b e r o f the a d d i t i o n a l v a r i a b l e s (8.3.20), a c c o r d i n g to (5.2.2 a n d 3), w i t h (4.2.9). R e c a l l (8.2.85). C o n s e q u e n t l y , for the w h o l e s y s t e m o f b a l a n c e e q u a t i o n s (8.2.2) a n d (8.3.1) w e h a v e (M + Mh) + (D + Dh) = (N + Nh).
(8.3.26)
Although the simplifying hypothesis that Gu is connected has been adopted as plausible, the cases where it does not hold are still conceivable. The reader can imagine for instance two parallelly ranged pre-heaters of a stream (thus preceded by a splitter) followed by another splitter in the direction of the flow. Such cases then require special consideration. So in the case just mentioned, it can be shown that the set of constraints remains minimal, thus (8.3.26) applies. Generally, previous graph analysis can be helpful. We have to examine whether the subgraph G, [N-S, Ju ] obtained by the deletion of splitters (s e S) and incident arcs 0" e J') is connected. If it happens that G, has L+I connected components where L > 1 we can modify the analysis applied to subgraph Guk; see Fig. 8-7 in Subsection 8.2.2. The analysis is simpler; if the reader has perused Section 8.2 in detail he will be able to find the modifications. In Fig. 8-7, we replace Juk by Ju, J' n E k by J', Nuk by T u w {0}, and Sk by S. The connected components (say) G~u (l = 0, ..-, L+l) of Gu will be of node sets N ~and arc sets J~. Now in the equation (8.3.1a), we merge the nodes in each G~o where 1 <_ l < L in the same manner as in (8.2.20)" the vector components m ki are replaced by the components h ~(i e J~) and h '-i (j ~ J') of vectors h, and h', respectively. By the merging, we arrive at equations the components of h', thus in fact h 'j~ (s e S) have to obey, given the splitting ratios ctj. We then obtain a condition analogous to (8.2.29) with L instead of Lk and matrix (say) G in lieu of Gk; it will be a sufficient condition for the solvability. The equation (8.3.6) will subsist. The new solvability condition satisfied, we find the components of vectors hu and h' as functions of vector q" and of components of a composed vector such as (8.2.49), in number
250
Material and Energy Balancing in the Process Industries
IJul + I s ] - I N ~ I + 1= ILl + I s I - I T , I given the splitting ratios aj; adding to this number the number (8.3.21 c) of components of vector q", we have the number D h (8.3.23). As above, we conclude again that the whole set of balance equations is minimal thus obeying (8.3.26), with the same interpretation of
Mh, Dh, Nh.
8.3.2
The whole system of balance equations
Let us summarize the results of Sections 8.2 and 8.3. We have admitted the absence of certain components (chemical species) Ck in certain material streams (arcs)j of the graph G. For any k (= 1, ..., K), Ek is the subset of streams where component Ck can be present. The arbitrariness in the choice of the E k has been limited by the structural conditions (8.2.18), (8.2.22), and (8.2.29); see Section 8.2, first paragraph of Subsection 8.2.5. We have also limited the admissible flowrates to positive ones. [Observe that a system of balance equations that would not admit of such solutions would be technologically absurd.] We have further assumed, as motivated by the consideration following after (5.2.4), that the subgraph G u [N-S, Ju ] of G, obtained by deleting the splitters and the incident arcs, is connected; the hypothesis can be weakened, as remarked at the end of Subsection 8.3.1. Considering the graph GE of net energy streams and the incident nodes (distributors d e D z included), we have adopted the conventions (a)-(c) following after (8.3.2). We have considered an a priori given state of aggregation and pressure PJ in each of the streams j e J. Then the system of balance equations (8.2.2) with (8.2.1), and (8.3.1) has Dto t --
D + Dn
(8.3.27)
degrees offreedom, where D is the number (8.2.78), and D h the number (8.3.23). In rigorous mathematical terms, the s e t ~//'tot o f the solutions is a differentiable
manifold of dimension dimYfftot = Dto t
(8.3.28)
and a submanifold of the space of the Ntot -" N + Nh
(8.3.29)
variables mj, y~ (j e J; k = 1, ..., K), T j (j e J), and q~ (i e E); here, N is the number (8.2.4) and Nh the number (8.3.25).
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
251
We have Mto t -t- Dto t = Nto t
(8.3.30)
where Mto t --
M + Mh
(8.3.31)
is the number of the (scalar) balance equations, with (8.2.3) and (8.3.22). Hence the number of degrees of freedom equals the number of variables minus the number of equations (constraints). We thus call the system of equations regular; see the precision in Section 8.4. See also Remarks (i)-(iv) in Subsection 8.2.6. Further remarks will follow.
8.3.3
Heat exchangers See the last paragraph of Section 5.2. Formally, a heat exchanger is a
couple of nodes {n', n"} c T u
(8.3.32)
(non-splitters) such that there is just one arc (net energy stream) i ~ E of endpoints n' and n", and no arc (material stream)j ~ J connecting directly the two nodes; see Figs. 5-2 and 5-3. Physically, we regard as heat exchangers only such couples of nodes where the energy flowrate qi represents a heat transfer rate. The partition of a heat exchanger (as technological unit) into two nodes (8.3.32) has been motivated by separate (generally multicomponent) mass balances of the 'cold' and 'hot' sides. On the other hand, it can happen that we are not interested in the (unknown) heat transfer rates. Then the latter can be eliminated by merging the nodes (8.3.32). Let us first partition the set E of net energy streams E = E* w ECx (E* n ECx = 0 )
(8.3.33)
where E~x is a subset Of streams i e E corresponding to certain (not necessarily all) heat transfer rates to be eliminated. Each arc i e E~x has precisely two endpoints n'i and n'~ that, according to (8.3.32), represent some heat exchanger, say H i = {n'i , n'~ } (i e Eex) 9 Then the set T u is partitioned
(8.3.34)
252
Material and Energy Balancing in the Process Industries
T u - T~ u u H i
(8.3.35)
i~ Eex
where T~ contains the remaining nodes (units); the environment is not element of any H i (nor element of T~ ). Then merging the two nodes of each H i in the graph G u [N-S, Ju ] yields graph G~ of nodes 0 (environment), n e T~, and (say) h i (i e Eex ) and
(8.3.36)
of arcs j e Ju because no arc j e Ju has been eliminated by the merging. The nodes h i a r e uniquely determined by the couples H i , hence represent the corresponding heat exchangers (technological units) in the reduced graph. With the plausible hypothesis that G u is connected, also G~ is connected. The merging concerns the energy balance only. We can apply the merging as well to the whole graph of nodes n e N and d e D z, and arcs j e J and i e E, thus to the union of graphs G and Gz; see Section 5.2, first paragraph. Then, in the reduced graph, the arcs i ~ E~x are deleted. Recall that merging two nodes (thus n I and n'~, i e Eex ) means summation of the corresponding rows of the incidence matrix. Thus the matrix C (5.2.4) is 'reduced' to C~ C'* ) } T u and nodes hi, i ~ Eex 0
c"
Ju
J'
Is
(8.3.37)
and the matrix D (5.2.1) to D . = / D~ ) D~ E
} T~andnodeshi,i~Eex }D E
(8.3.38)
*
operating on column vector q* of components qi, i ~ E* (= E-Eex );
(8.3.39)
the arcs i e E~x have been deleted. Here, C~ is reduced incidence matrix of graph G~, thus if G~ is connected then
253
C h a p t e r 8 - Solvability and Classification of Variables II- Nonlinear Systems
rankC~ = IT~[ + [Eex[
(8.3.40)
(full row rank). Observe that none of the nodes d e D E has been affected by the merging, and that no d e DE is incident with any i e Eex. Hence the partition of submatrix D; is again of the form (8.3.3), with certain (zero) columns of De deleted. Consequently, instead of the system (8.3.1) we now have Cuhu+
C' h ' + D uq = 0
(8.3.41a)
D: q* - 0
(8.3.4 lb)
Sfi'
= 0.
(8.3.41c)
We can now repeat, step by step, all the considerations of Subsection 8.3.1 leading to the final conclusion, summarized in Subsection 8.3.2. Only in (8.3.22)-(8.2.25), we have the new numbers
~--ITS[
+ IEex[ + IDEI + Z
s~ S
D;= ]Ju]-IT;I-Igexl ~=
[Jsl
+ IsI + IN*l-IDol
(8.3.42) (8.3.43)
[Jul + IsI + ~slJ~l +IE*I
--I J[ + IE*I
(8.3.44)
thus
(8.3.45)
/lfh + Dh = / ~ h . By the way, observe that
IT:I + [Eexi--ITul-IEexl because just one node in each [E*[ = I E [ -
Hi
(8.3.34 an 35) has been deleted, and that
[Eexl
by (8.3.33). Hence, in fact Dh= Dh
(8.3.46)
thus the number of degrees of freedom remains unaltered; indeed, any of the heat transfer rates qi (i E Eex ) is uniquely determined (say) by the node n'i energy
254
Material and Energy Balancing in the Process Industries
balance, given the other values of the variables. The reduction (8.3.41) thus only simplifies the problem, without reducing the information (of course if the heat transfer rates qi, i e Eex a r e not known a priori; else such qi would not be deleted). In the results (8.3.27-31), ~ is substituted for Nh and h/Fhfor M h , Yff~ot stands now for ~tot and we have the number of degrees of freedom d i m M tot = d i m M t o t = Dto t
(8.3.47)
Recall that we have not merged the nodes in the component mass balances. As an example, let us again consider the sulphuric acid plant; see Subsection 8.2.7. In Section 5.3, we have extended the technological scheme according to Figs.5.4-5.7. The component mass balances are extended trivially. By Fig. 5-4 we add the equalities | ~
mk
'
m~ ( k = 2 , 3 , 4 )
and by Fig. 5-7b m k3
m 3' a n d m 6k
m~' ( k = 2 , 3 , 5 , 6 )
In the component mass balances, no new degrees of freedom arise. The subgraph G, is obtained by deleting the splitters (S1, $2, $3) and the incident arcs 2,3, 4, 6', 7, 8, 14, 15, 16, 17; the reader can draw the figure and verify that G u is connected thus condition (8.3.2) is obeyed. The set D E of energy distributors is empty and the matrix D e in (5.2.1) thus (8.3.3) is absent. Thus IDol - 0 and q = q" in (8.3.4). According to the procedure described, all the components of vector q hence qf, qa, q~, qb, qal, qa2 can be taken as independent parameters. According to (8.3.9), the components of subvector hs thus the specific enthalpies
can also be taken as independent. In G u , we can find a spanning tree by the deletion of certain (of course not arbitrary) arcs in number ]Ju [-] T~I = 11-8 = 3; see (8.3.10) The deleted arcs represent independent parameters; let us delete for instance arcs 1, 12, 18 hence
/~,,/~,~,/q,~ can be taken as independent. As independent parameters, instead of the specific enthalpies we can take the temperatures T 2, T 6', T 14, T l, T 12, T 18 "
Observe that by the node B balance mll/~ll + my/~y= m5/2/5 + qb
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
255
where the mass flowrates have been determined according to Subsection 8.2.7, the (so far independent) parameter qb Can be determined when replaced by another independent parameter, viz. /~rll resp. T 11
which is specific enthalpy resp. temperature of input liquid sulphur. The quantity qh represents steam production in energy units and is thus, along with other variables, determined by the energy balance of the plant, given the independent parameters. The new parameters (added to those found in Subsection 8.2.7) represent enthalpies resp. temperatures of input streams 1, 11, 12 and process parameters T 2, T 6', T 14, T 18along with heat withdrawn from the system (qd, qal, qa2), power supply qf to the fan F (Fig. 5-4) and heat qe transferred in the exchanger {E3, E6} (Fig. 5-7b). If the latter two nodes are merged according to (8.3.36), we obtain graph G~ instead of Gu. We can apply the formal procedure as above, or consider simply that the variable qe has been eliminated while, according to (8.3.47), the number of degrees of freedom remains unaltered. Hence a new independent variable has to be added to those found above. We can take for instance the variable T y thus the temperature of dry combustion air into B, according to Fig. 5-7a. Then qe, when necessary, can be computed from the balance of the exchanger where the parameters of the streams are known. Recall finally (cf. Subsection 8.2.7) that the independent parameters are arbitrary only with respect to the set of the balance equations. Eventually, they must obey in addition the equations of the extended model, taking into account the physicochemical processes in the nodes (such as heat transfer in the exchanger) and the construction parameters of the apparatuses.
8.3.4
Heat and mass balances
Recall the introducing paragraphs to Section 5.4, and also the last paragraph before E x a m p l e 6 of Section 8.1. The 'heat and mass balances' (5.4.6) are of the same form as the complete balances examined in this section, only the chemical composition dependencies are suppressed. Instead of the m u l t i c o m p o n e n t mass balance, we have formally a single-component mass balance, and in the energy balance, the (a priori assessed) term s can occur in addition as a constant in (5.4.6)3. The whole analysis holds true as well for the system (5.4.6). W e can write immediately the result. In the single-component mass balance we set (number of components) K = 1 and E k = E~ = J. The only limitation is the condition mj > 0 for a n y j e J
(8.3.48)
(and possibly the condition formulated in the fine-printed paragraphs after (8.3.26), if G u happens to have several connected components). In (8.2.78) we thus have
256
Material and Energy Balancing in the Process Industries
O--ITul + IJu[ + IsI + z [ J s l - I s I s~ S
thus simply
D= IJI-IN~I
;
(8.3.49)
see (3.1.4-6). D is thus the dimension of the null space M = KerC, which is the space of solutions of the mass balance equation (3.1.6). According to (8.2.3) we have formally
M-ITul + IsI +s~slJ~l § IJul + IsI thus M=
INu] + IJI
while in (8.2.4) N=2[JI thus N - I J[ + I J[. The I J[ equations (8.2.2c, d, e) concern I J[ variables y~(j ~ J, with K = 1) and determine only y~ = 1. Deleting the latter trivial equations, the number of equations becomes IN. [ and that of variables mj (j J) equals l J I, as corresponds to the equations (5.4.6)~ and (5.4.6)2. On the other hand, the numbers M h (8.3.22), D h (8.3.23), and N h (8.3.25) remain unaltered. Consequently, if ~M"tot is again the set (manifold) of solutions of (5.4.6), we have
(8.3.50)
dimPl4ftot = D + D h (= Dto t )
with (8.3.49) and (8.3.23). The set of equations is again minimal thus obeying
IJI +N~--INul-I-Mh-I-Otot
;
(8.3.5~)
the number of variables mj, 7~ (j ~ J), and qi (i ~ E) equals the number of scalar equations plus the number of degrees of freedom. Recall that the pressures PJ and the states of aggregation in the streams j ~ J are again regarded as given a priori. By the way and in particular in the simplified heat and mass balances, the pressure dependence of specific enthalpy can often be neglected at least in a condensed (solid or liquid) phase.
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
257
In the same manner as in the previous subsection, we can eliminate the heat transfer rates qi (i E Eex ). The modification is left to the reader.
8.3.5
General nonlinear models . .
The balance equations analyzed in Sections 8.2 and 8.3 are examples of nonlinear models (sets of constraints). We limit ourselves to 'steady-state' models, in the sense explained in Section 4.2, first paragraph. Generally, such model reads g(z;o) = 0
(8.3.52)
where z is an N-vector of unknowns, and p is a vector of a priori given parameters; for instance in the above energy balance equations, p is of components (pressures) PJ (j ~ J). The vector-valued function g is of, say, M components where M is the number of the corresponding scalar equations. Generally, the equations are nonlinear. Introducing the vector p makes sense when the dependence of the solutions on the a priori parameters is analyzed. Among the components of p, we can also have certain thermodynamic data such as specific heats, standard enthalpies, and the like. Some of the components of p can be certain constants of the model specific to the given system, but not known a priori; then the problem reads finding the values of these constants based on certain measured data. We shall not deal with problems of this kind. Hence the model will read more simply g(z) = 0 ;
(8.3.53)
any admissible value of z determines some state of the system (not to be confounded with the narrower concept of a 'thermodynamic state'). Let M b e the set of solutions; we call the model solvable when M~: 0 . A special case is when the model is uniquely solvable, thus when g(z) = 0 if and only if z = z 0
(8.3.54)
where vector z 0 represents the unique solution, thus M = {z 0 }. Generally, the set M of vectors z obeying the condition (8.3.53) is called feasible set (Stanley and Mah, 1981a), with respect to the constraints represented by the M scalar equations in (8.3.53). A meaningful model is clearly solvable. But generally, the set M can have rather strange properties and the analysis is difficult. In the case of balance
258
Material and Energy Balancing in the Process Industries
equations, we have shown that Mis, as the mathematicians put it, a differentiable manifold. We then call M the solution manifold of the system (8.3.53) of constraints. The situation can change when certain components of vector z have been fixed (for example as the measured ones). See the examples in Section 8.1. The analysis is then considerably more difficult. To some extent, it is facilitated when the feasible set is a manifold, as will be shown in the next sections.
8.4
JACOBI MATRIX AND LINEARISATION
In the analysis of nonlinear problems, the first step usually consists in that the problem is linearized. That means that nonlinear functions occurring in the problem are approximated by Taylor expansion up to the first degree. For a vector-valued function of several variables, the coefficients (partial derivatives) are elements of the Jacobi matrix. Let g be an M-vector of scalar functions gm of N scalar variables Zv, thus of N-vector z. Then the Jacobi matrix of g, say G, is the M x N matrix of elements Gmv = ~gm ] ~Zv
(8.4.1)
Let us designate Dg = G
(8.4.2)
the Jacobi matrix Of an arbitrary g. It is again a (matrix) function of z, thus Dg(z) is the value of Dg at point z. We shall suppose that g is (at least) twice continuously differentiable in an N-dimensional (open) interval U; 'open' means that the boundary of U is not included in U. For example in the above balance equations, U is limited by the conditions mj > 0 (j s J), possibly also by other inequalities in addition. Let z 0 s U. For an arbitrary z s U, the Taylor formula (restricted to the first degree) reads g(z) = g(z o ) + Dg(z 0 ) ( z - z o ) + d(z; z 0 )
(8.4.3)
where given Zo, d(z; z 0 ) depends on z in the manner that if the difference Z-Zo tends to zero, d(z; z 0) becomes 'negligibly small'. In fact Taylor's formula gives an exact expression to this d in terms of an integral; if dm is the m-th component then
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
dm =
]~,Dm;vv, (zS~,v )(Z~v, )
259
(8.4.3a)
V, V
where AZv is the v-th component of z-z 0 , and Dm;vv, = Dm,v, v (symmetric) is determined (as an integral expression) by the values of the second derivatives on the line segment between z 0 and z. One thus can say that d m is 'quadratically small' in the differences AZv, if they tend to zero. The linearisation of function g in a neighbourhood of point z 0 (for small AZv ) consists in approximating _
g(z)
--- g(z 0 ) + Dg(z 0 )(z-z 0 ) = Dg(z 0 )z + (g(z 0 )-Dg(z 0 )z 0 ) .
(8.4.4)
In this manner, for example the equation (8.3.53) becomes a linear equation (7.1.1) and can be analyzed by the methods described in Chapter 7. Let us have a model (set of constraints) g(z) = 0
(8.4.5)
as in (8.3.53), where g is the function considered in (8.4.1-4). Let us assume g infinitely differentiable on the N-dimensional interval U, so as to simplify the mathematical terminology and in accord with Sections 8.2 and 8.3. Thus Taylor's formula (8.4.3) applies. Even then, not any such function admits of a meaningful approximation (8.4.4). Imagine a function h, with m-th component h m = (gm)2. Then h(z) = 0 if and only if g(z) = 0, thus the set M of solutions remains unaltered. But because Dh m = 2g mDg m , we have Dh(z 0 ) = 0 for any z 0 ~ M. Although the approximation (8.4.4) with h in lieu of g remains correct up to the first degree, it is of no use when the properties of M have to be examined. Less trivial examples can be invented. Generally, the same set of constraints (representing the same feasible set M) can be formulated by an infinity of equivalent equations. While in linear algebra, the equivalence means simply a regular transformation (multiplying by a regular square matrix), this is not the case when nonlinearity is admitted. Then not any (though equivalent) formulation of the model is equally appropriate for the solvability analysis. Observe that in (7.1.4), we assumed that the matrix C was of full row rank. It is thus natural to require also in the present case that rankDg(z o ) = M for any z o e M
(8.4.6)
thus that Dg(z 0 ) is of full row rank (at least) on the set M of solutions of (8.4.5). Such model (better to say, its formulation using the function g) will be called regular. To be precise, we (of course) suppose that there exists some solution, thus M ~ ~ . Well-known theorems of Analysis then show that the rank remains constant at least in a neighbourhood of the set M (at points 'not very distant'
260
Material and Energy Balancing in the Process Industries
from M), and that the feasible set M is a differentiable manifold, in the rigorous mathematical sense. Moreover, its dimension is .
dimM= N- M ;
(8.4.7)
compare with (7.1.1), (7.1.4), and (7.1.6-8) with the subsequent text. Going back to the approximation (8.4.4) where now z0 ~ M thus g(z 0 ) = 0, and substituting v for z-z 0 we have (approximately) the equation Dg(z 0 )v = 0
(8.4.8)
for any other solution z = z 0 + v ~ M of (8,4.5), 'not too far' from z 0 . Thus any other such solution is (approximately) found when shifting slightly the point z 0 along a vector v obeying (8.4.8), thus belonging to the null space KerDg(z 0 ) of dimension N-M. The null space (generated by the vectors v) is called the tangent space to M at point z o (~ M). In Analysis, it is defined by a more sophisticated construction directly, using the properties of M (independent of the particular g)" the tangent space is generated by tangent vectors to curves traced on M and passing through point z o . Imagine a surface in threedimensional space, and the tangent plane at some point of the surface. In Sections 8.2 and 8.3, we have made use of other ideas leading to the concept of a (differentiable) manifold by way of certain 'degrees of freedom' in a parametrisation of M . The ideas are interrelated and when precised mathematically (which, of course, has not been possible in this book), they lead to the same concept. Although we have stated that the sets M i n (8.2.84) and Mtot in (8.3.50) are differentiable manifolds we have, in fact, still not proved that the models (8.2.2) and (8.3.1) are regular in the above sense. But it is so, indeed. Thus under the structural hypotheses summarized in Subsection 8.3.2 The multcomponent mass balances (8.2.2) with (8.2.1) and the energy balance (8.3.1) constitute a regular model (set o f constraints).
The proof is again quite nontrivial in details; let us only outline the idea of the proof. It follows the same lines as in (8.2.11)-(8.2.72), and in (8.3.2)-(8.3.26). One first transforms the equations (8.2.2) with (8.2.1), using the substitutions (diffeomorphisms) (8.2.70 and 71) with (8.2.69); one proves that at points of M, the rank of the system remains unaltered when Eqs.(8.2.2b) are multiplied by l/mis , Eqs.(8.2.2c) by ~.i mj, Eqs.(8.2.2d and f) by mj, and (8.2.2e and g) by mj~. One then forms the differentials of the transformed equations and puts them equal to zero. The differentials are in terms dm~, d%, and dmk (n), and one finds that all the differentials of the transformed variables dm~ and dotj are linear combinations of the components of dx, dv, dc~, and din" where x, v, c~, and m" are the same as in (8.2.55), thus representing D scalar components. In this manner, one shows that the dimension of the null space is D, thus the rank of the Jacobi matrix equals N-D = M for the system (8.2.2).
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
261
The analysis of subsystem (8.3.1) is easier. One has only to show that the submatrix corresponding to the new variables T -i and qi is of full row rank. At constant mass flowrates and compositions of the streams, by (8.3.19) the transformation (substitution) (8.3.18) is a diffeomorphism, and in terms of t h e / T and qi ~at constant m (vector of mass flowrates) the equations (8.3.1) are linear; the result is then immediate, using the linear transformations (8.3.5)and (8.3.15). Thus the rank of the submatrix equals Mh and is again full. The row rank of the whole system is also full, equal to M + Mh.
In the more detailed analysis of the balance equations that will follow in Section 8.5, we thus can start from the Jacobi matrix Dg where g is represented by the LH-sides of the equations (8.2.2) and (8.3.1). The equations and variables are partitioned into certain groups and not assigned a fixed numeric order; in addition we make use of composed variables (substitutions) such as (8.2.1). So as to find a general expression for the Jacobi matrix, let us rewrite it in terms of differentials. If h is a differentiable function of variable y then its differential is the formal expression dh(y) = Dh(y)dy
(8.4.9)
having the property that with the substitution y = fix) thus k(x) = h(f(x)) we have (8.4.10)
dk(x) = Dh(y)df(x)
(the 'chain rule' of differentiation). The formalism enables us to identify the elements of the Jacobi matrix as coefficients at the corresponding differentials dzv in any row of the differentiated equation, whatever be the order of the equations gm (Z) = 0 and components Zv of z. In the system (8.2.2) with (8.2.1) we thus have the differentials in the rows n ~ T u in number K(n)-R o (n) for each n: D(n)dn(n) where
dn(n) =
dnk'(n) k~ K(n) (8.4.11a)
1 Z Cn i ( y ~ d m i + m i d y ~ ) ,9 and dnk (n) = - -Mki~E~
262
Material and Energy Balancing in the Process Industries
here, K(n) is the set of K(n) indices k of components Ck occurring in the node n balance; further, in the rows s~S"
Z_ Csj dmj, thus dmjs - Z dmj
j~js
s~J~
(8.4.11b)
represents the corresponding row of the Jacobi matrix, with element 1 in column mj, -1 in columns mj, j ~ J~, else zero; further
s ~ S , j ~ Js k = 1, ..., K:
dy~s- dye, K Z dy~
J ~ Ju"
k=l K
s e S"
Z dy~
k=l
k=l,...,K J e Ju, J ~ Ek"
(8.4.1 lc) (8.4.11d)
(8.4.11e)
dy~
(8.4.11f)
dye?
(8.4.11g)
and
k=l,...,K s E S, j~ ~ F_~"
The equations (8.2.2b-g) are linear and the elements of the Jacobi matrix in the rows (8.4.1 lb-g) are constants (+1 or 0). In (8.4.1 la), the elements can be found if the values yik and m i are given. Then, if Dtk (n) (t = 1, --- , K(n)-R o (n); k ~ K(n)) is an element of matrix D(n), the t-th differential in the n-th subset of rows equals
1 - E Dtk (n) ]~ Cni (y~ d m i + m i dyl~ ) . k~ K(n) M k ie F~
Thus for example the element in the column m i (i E J) of the Jacobi matrix equals, in the t-th row of the n-th subset
1 - Y~ Dtk (11) Cn ini k i k~ K(n) M-k Yk
where Bik = 1 if i ~ E k , Bik = 0 if i ~ Ek; cf. (4.5.5). The element in the column y~ (corresponding to dy~ ) equals
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems -Dtk (n)
1
Cni mi
263
for i ~ E k
and zero for i ~ E k . One could also discard directly all the variables y~, i ~ E k , equal to zero by hypothesis, from the list of variables. We leave the modification to the reader. The reader can also set up the Jacobi matrix in the special case where no chemical reaction is admitted, and all components are admitted in all streams; see then Remark (iii) in Subsection 8.2.6. In the system (8.3.1), we shall make use of the substitutions (8.3.18). Consequently, with (5.2.15 and 16) where lau is vector of components/T, j ~ Ju (arcs nonincident to splitters)
(8.4.12)
and fi' is of components/T, j s J' (J' - J-Ju )
(8.4.13)
we have the following differentials. In the subset of rows n ~ Wu: A
C, (diagla u )dm, + C'(diagll')dm' + Cu (diagmu)dllu + C'(diagm')dh' + Dud q (8.4.14a) in the rows d ~ DE:
D e dq
and in the groups of rows s ~ S, in number [Js I for each s" Sdh'
(8.4.14b)
(8.4.14c)
thus -d/-~ + d / ~
(j ~ J s)
represents the corresponding I J~ I rows of the Jacobi matrix, with elements -1 in column/T~, 1 in column/T, else zero. The reader can himself set up the (quite analogous) Jacobi matrix of the reduced system (8.3.41), and also of the (possibly again reduced) system of heat and mass balances (5.4.6). In the latter case, the subsystem of mass balance equations is linear (thus with Jacobi matrix equal to the matrix of the linear subsystem), and the remaining subsystem yields Jacobi (sub)matrix of the same format as (8.4.14). What remains now is to express d/T in terms of the differentials of the variables T and yJ, see (8.3.18), and substitute the differentials for the
264
Material and Energy Balancing in the Process Industries
components of vectors dlau and dl~'. Again, pressure PJ is considered known a priori, not perhaps adjusted according to the measured values, nor computed from the balance; thus dP j does not occur in the differential. By the way, regarding also (some of the) PJ as variables would only increase the number of variables, but not that of the equations (constraints); hence the (full row) rank of the matrix would not change. The expression for d/T (j ~ J) depends on how detailed is our thermodynamic description of the system. Let us begin with the simplest case, that of heat and mass balance equations. Then, according to Section 5.4, the specific enthalpies /T, denoted by hJ~, are functions of temperature only; see (5.4.5). Thus J dT j (j e J)
(8.4.15)
by (8.3.19). [Attention: the subscript s has here nothing in common with any J can still splitter; it is related to the wording 'sensible heat'.] The specific heat Cp depend on temperature (thus inducing a higher degree of nonlinearity), or be assessed as constant. Note that if steam is used as a heating medium, or if it arises in a steam generator then the corresponding items can be included as components of vector q, not necessarily among the heat contents of streams j~J. Generally, thermodynamically consistent are the expressions (C.10) /T
-
Z yJk/4~ k
(8.4.16)
with summation over indices k of components Ck present in the stream;/4~ is partial specific enthalpy of Ck in stream j, thus at T (given PJ ) and 3; (composition of the stream). Since the mass fractions must obey the condition (4.2.2), one of them is not independent and we have E dy~ = 0 .
(8.4.17)
k
Then, by (C.10) and (C.21) we have the thermodynamically exact expression dI)J-c~dTJ+ E /-lJdy~ ke C~j')
(8.4.18)
where C(j) is the set of k such that Ck is present in stream j. But in practice, other expressions for specific enthalpy can be applied directly, for example using tables and interpolation formulae. Recall only again the requirements for
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
265
thermodynamic consistency, in particular if some nodes are reaction nodes, if phase transitions take place, or, in certain cases, also if the heat of mixing is relevant; see the examples in Section 5.3. So the expression for d/T requires an ad hoc consideration. Remark: Complications can arise when stream j is a multiphase mixture. The energy (enthalpy) balance in terms of the specific enthalpies/210 will anyway hold true, as well as the individual component balances, where YJkis the mass fraction of Ck in the whole mixture. The case will, however, require again a special consideration. Generally, new variables, say fie will occur, where fie is mass fraction of phase f in stream j, obeying F. E' ~ f=l
1
(8.4.19)
where Fj (usually - 2) is the number of phases f in stream j. Then
/_Tf= :~J ~/.~ (f) f=l
(8.4.20)
where/T (3') is specific enthalpy of phase f in stream j. We shall not analyze the general case. In particular if the stream j is a vapour-liquid mixture (Fj = 2), an additional condition will be that of thermodynamic phase equilibrium; thus given again PJ, the variables /T, T J, ~ , and the Ck-fractions in the vapour-liquid mixture are interrelated. For example/2p is obtained as function of T j, p~ (mass fraction of the vapour phase), and the chemical composition of the stream as a whole (while the composition variables of individual phases are eliminated by the equilibrium conditions), with parameter PJ; the function can be primarily obtained in molar quantities, and re-calculated to specific enthalpy and mass fractions. In practice, the case can occur as a vapour-liquid feed into a distillation column.
8.5
CLASSIFICATION PROBLEMS; OBSERVABILITY AND REDUNDANCY
8.5.1
Examples
Let us return to the examples in Section 8.1. We have seen that a classification of variables, which was uniquely possible in the linear case, can fail if the equations are nonlinear. Some (though incomplete) information can be obtained when the equations have been linearized. So let us begin with the Jacobi matrix of the system (8.1.1). Let C be the matrix, hence
266
Material and Energy Balancing in the Process Industries m l m2 m3 y l y2 y3
1
C -
1
T 1 T2 T3 Q
-1
yl y2 _y3 ml m2 -m 3
(8.5.1)
h l ha -h3 Pl P2 -P3 q l q2 -q3 -1 where ()h i
i = 1' 2, 3" P i - mi ~~yi ' qi = mi Cpi ,.
(8.5.1a)
Cpi ( > 0 ) is again isobaric specific heat. We have eliminated one of the mass fractions in each of the material streams, say yi1 - 1-y~ where y i = y~, which brings no complication in the present case. We see immediately that if m i > 0
(i = 1, 2, 3) then C is of full row rank even if the variable Q is deleted (heat exchanger absent). But C depends on the state variables (vector z). Let M b e the solution manifold; if z e Mthen z obeys Eqs.(8.1.1). In the sequel, we are referring to the numbered examples of Section 8.1.
Example 1
Let us have measured the variables 3~ and 7~ (j = 1, 2, 3), and Q; we have the equivalent conditions (8.1.11) with (8.1.2) for z e M. Let us partition the matrix C-(
B
,
unmeasured
A
)
(8.5.2)
measured
as in (7.1.10). We shall examine the matrix B; thus ml m2 m3
1
1
-1
B-
(8.5.3) f,2
.
The rank of B remains unaltered when j-th column is multiplied by mj > 0, and the sum of columns 1 and 2 is then added to column 3, giving
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
B' =
m 1
m2
m 1
--I- m 2
- m3
ml ~2
m2~2
ml )1
4. m2 ~2
_ m3 ~3
m, ~1
m2 ~2
m, ~1 + m2 ~./2
_
267
(8.5.4)
m3 ~3
with rankB' = rankB
(8.5.4a)
Let first Q r 0. Then the condition of solvability is (8.1.13) and adding the third column in (8.5.3) to the first and second, one finds immediately that this is also a necessary and sufficient condition for rankB to be full rank. Then, whatever be otherwise the measured values, Eq.(8.1.1) is uniquely solvable. Thus if the admissible region of measured values is restricted to a subset of variables obeying the inequalities (8.1.13) and (say) Q > 0, the system can be called 'observable' in the mj, and at the same time we have rankB = 3. Let us now admit the case that Q = 0; see the text before formula (8.1.17), but let still all the temperatures be measured. The measured values can, nonetheless, obey the condition (8.1.13). But then the only solution is m~ = m 2 = m 3 = 0. Conversely insisting on positive mass flowrates, we must have (8.1.14) for the adjusted values; but then rankB < 2. Or we admit an error in Q; then the mass fractions can be assigned the measured values, but the mass flowrates remain undetermined, as the actual Q is unknown. Simply, we do not know where is the error, and also the adjustment conditions remain undetermined. Observe that having admitted Q - 0, we have rankB < 2 at some points of M, while rankB = 3 at other points. The classification of variables fails, while the problem is 'not well-posed'.
Example 2 Let further the heat exchanger be absent. Then the variable Q is also absent, and we have the condition (8.1.14). Let in addition the condition (8.1.12) be satisfied in the admissible region of measured variables. Then, on M, by (8.1.1) where Q = 0, according to (8.5.4) we have
B'-
m 1
m2
0
mlY 1
m2Y 2
0
m,
m 2 T/2
0
]/1
(8.5.5)
thus by (8.5.4a) rankB = 2 on M; recall that ~1 r ~2 by (8.1.12). Let us suppress the latter condition and admit for instance ~1 = ~3. Then also ~2 _ ~3 and on M,
268
Material and Energy Balancing in the Process Industries
we have points where also ~t~ - ~ / 2 ~./3, and at these points, we have rankB = rankB' = 1. Thus rankB is not constant on M. The classification of measured variables fails. Under the condition (8.1.12) for the admitted region of variables, a classification is theoretically possible, as shown after formula (8.1.15). But some flaw still remains. So as to formulate the solvability condition (8.1.14), a pre-treatment of the equations was necessary, using the condition (8.1.6). In complex systems, such pre-treatment is not always obvious by inspection. Having certain actually measured values (of mass fractions and temperatures in the present example), a condition such as (8.1.14) will most likely not be satisfied, due to measurement errors. Thus in the present case, in the linearized system, when starting from the measured values the matrix B will be of rank 3. The formal degree of redundancy will equal zero and no adjustment (reconciliation) will take place. Without the pre-treatment, the system is linear in m~, m 2 , m 3 and the unique solution is m~ = m 2 = m 3 = 0. Observe that we have here rankB = 3 in the a priori admitted region, with the exception of points z e M where rankB = 2. The problem appears again rather as 'not well-posed'.
Example 3 Let us have again Q = 0 (no heat exchanger), but let us have measured in addition m 3 = m3; let rh3 > 0. Thus our B consists of the columns m~ and m2 in (8.5.3), thus
B'-
1
1
~
~2
i,
(8.5.6) .
It is not difficult to show that if the condition (8.1.12) is fulfilled then ~1 ~: ~2 and rankB = 2 in the whole admissible region, in particular on M. In the linearized system, we thus obtain the degree of redundancy equal to 1. On the other hand, so long as rh3 > 0, we obtain again the condition (8.1.14) and this condition satisfied, we have m~ > 0 and m2 > 0. Further, because the two columns of B are linearly independent and because on M, as shown above, with the third column of (8.5.3) the rank of the matrix equals also 2, the ~ 3 - c o l u m n of the Jacobi matrix is a linear combination of the columns of the new matrix B (8.5.6). According to (7.1.27), at points of M the measured variable rh3 can be qualified as nonredundant, in accord with the tentative qualification before formula (8.1.16). But observe that at points z ~ M, the matrix (8.5.3) is of rank 3, thus in the linearized system, again by (7.1.27), rh3 will be qualified as redundant. If
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
269
we apply an adjustment (reconciliation) procedure using, in any approximation step, a linearized system then all the temperatures, mass fractions, as well as the variable rh3 will be sucessively adjusted. But in the end, so long as rh 3 remains positive, we must arrive at a solution, thus at a point z ~ 91//where rh3 becomes nonredundant in the sense (7.1.27). A mathematical proof not given here (but see Section 10.3) shows, however, that the final rh 3 will then equal the original one; to be quite precise, under a (plausible) norming condition derived from statistics. Thus the variable/'~/3 c a n be called 'nonadjustable'. We can call the problem 'well-posed'. Nonetheless, under unfavourable circumstances thus when the initial estimates (in particular mass fractions and temperatures) are 'too far' from 914, it can also happen that by the procedure, we arrive at rh3 = 0 and m~ = m 2 -- 0 , along with some incidental values of 53 and ktj. Such possibility can never be avoided; the measured values are then discarded. So in practice, an adjustment procedure can fail either because the problem is 'not well-posed' (it then most likely fails always), or because the initial estimates (measured values) are 'too bad'.
Example 4 Let us now return again to the case when a heat exchanger is present, and let us admit positive as well as negative values of Q; see the text before formula (8.1.17). We now add variable T 2 t o the set of the unmeasured ones. Then, in addition to (8.5.3), we have the T2-column of (8.5.1) in B. Thus ^
B-
m~
m2 m3
T2
1
1
0
-1
)1 )2 _)3
0
~1 h 2 _~3 m2
(8.5.7) 2 Cp
Here, our admissibility conditions read (8.1.6) and (8.1.12). Then, clearly, rankB = 3 is full row rank, and we have no redundancy. Now for observability. Deleting any of the columns m~, m2, or m 3 leaves the rank unaltered. Let us delete the column T 2. We then obtain the matrix (8.5.3). If Q ~ 0, on M w e have (8.1.18), hence the condition (8.1.13) with h 2 instead of Ft2 is fulfilled and as above, B with column T 2 deleted remains with rank 3. According to (7.1.28), all the unmeasured variables will be qualified as unobservable, whatever be an estimated value of m 2 (> 0), and of h 2 such that the inequality (8.1.13) is obeyed; most likely, we shall use such estimates for a classification based on the linearized system. Let now, however, Q = 0. The matrix (8.5.7) is independent of this value and our first estimate of m 2 and h 2 will probably lead to the same
270
Material and Energy Balancing in the Process Industries
classification. But there are certain conditions the unmeasured variables have to obey. If subjecting the values to the conditions, thus estimating m2 and h 2 adequately, with Q - 0 in (8.1.18) we obtain the result (8.1.14) where h 2 stands for the correctly estimated h 2. Then deleting the column T 2 lowers the rank to 2. According to (7.1.28), we qualify T 2 as observable. This is quite in accord with the qualification in the text after formula (8.1.18). The adjustment problem can be called 'well-posed'. In the present case, no adjustment of measured values is necessary. The variable T 2 is 'exceptionally observable', else unobservable. The example was somewhat na'fve, it shall only illustrate the different possibilities. Analyzing the further examples of Section 8.1 in this manner would be annoying. The trickiness of a general and complete classification is perhaps evident. So far, any attempt to find some general criteria of observability/redundancy ended at an incomplete classification. By graph methods, one can arrive at a complete classification only under restrictive hypotheses, not warranted by practice. Else, in the best case one ends up with certain groups ('blocks') of variables that defy further refinement. Let us try to analyze the problem by linearisation, as illustrated by the above examples.
8.5.2
Theoreticalanalysis
Let us have again a general model (8.3.53) thus (8.4.5), with the notation and hypotheses (8.4.1-7). Thus the model reads
(8.5.8)
g(z) = 0 where z ~ U
where U is the admissible region; for simplicity, let U be an open (N-dimensional) interval in the N-space of state variables. Thus the Jacobi matrix Dg is an M • N matrix function of z, and we suppose that it is of full row rank M on the solution manifold M. Recall that M c U by (8.5.8). Let us partition the vector z z_(y
) }J x
} I = N-J
(unmeasured)
(8.5.9)
(measured)
with the corresponding partition
Dg=(B, J
A) }M;
(8.5.10)
I
thus the M x J resp. M x I matrices B resp. A are again functions of z. We suppose that the components of subvector x have been fixed a priori, for example
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
271
as measured. If x § is the vector of the fixed values, we have generally z ~ M if x = x § in (8.5.9), and whatever be y. The adjustment problem then involves finding some ~ such that
/:/
M for some y ;
(8.5.11)
given a priori some x +, we use some criterion for the adjustment ~-x § in the case of reconciliation derived from statistics and minimized by the adjustment. Possibly, we are then also interested in the values of y obeying (8.5.11) with given ~. Generalizing the nomenclature of Section 7.3, let us designate M + the set of ~ obeying (8.5.11)
(8.5.12)
thus the projection of the solution manifold M into the l-subspace of vectors x; cf. (7.3.4). Further, given some ~ obeying the solvability condition ~ ~ M § let us introduce the set M(~,) as in (7.3.10); thus
y e M(~)means
/y/
~ M.
(8.5.13)
Clearly, if ~ e M § then M(~) ~ O, else the set is empty. The adjustment problem thus involves finding ~ e M § 'as close as possible' to an a priori estimated (say, measured) value x +, and then perhaps also identifying the set M(~) of vectors y; in particular if M(~) is a one-element set then this y is unique. If the equation (8.5.8) is linear then the adjustment problem is completely solvable. Generally, because B depends on z, also its rank L(z) = rankB(z)
(8.5.14)
is a function of z; of course the function can take only integer values 0, 1, ..., the maximum being < J and < M. [Basically, it can happen that L(z) = 0 at some z; for instance if admitting also zero mass flowrates in (8.5.1), and if T 1 is the unmeasured variable then the rank of B equals zero if m~ = 0.] Let us designate L: the maximum L(z) for z ~ M .
(8.5.15)
Because the integer L < Min(J, M)
(8.5.15a)
272
Material and Energy Balancing in the Process Industries
the maximum is attained somewhere on M . It can be shown formally that if L(z 0 ) = L at some z 0 ~ M then L(z) = L also in some neighbourhood of z 0 in M (at points z ~ M ' sufficiently close' to z o). Moreover, we then have rankB(z) > L in some N-dimensional interval containing the point z0; but we can have L(z) > L if z ~ M. On the other hand, from the regularity hypothesis (8.4.6) it follows that the rank of Dg(z) equals M also in some N-dimensional interval containing z o , whatever be z0 ~ M . The standard argument reads as follows. If the rank of some matrix M(z) equals K at some z 0 then there exists some K • K submatrix whose determinant is nonnull at z0. Assuming M continuous as function of z, the determinant (as a continuous function) is nonnull also in some neighbourhood of z0, hence the rank is K at least; if K is maximum then rankM(z) = K in this neighbourhood.
The following analysis will be based on the properties of matrix B. In order to preclude 'ill-posed' problems, it would theoretically suffice to assume rankB constant on the manifold M. Motivated by the above examples we restrict ourselves, however, to 'well-posed' problems assuming that the rank equals L also in an N-dimensional neighbourhood of any z ~ M; we can suppose that this neighbourhood is an N-dimensional interval. The assumption rankB = L in some neighbourhood of M
(8.5.16)
means that whatever be z ~ M , there exists an N-dimensional interval (say) U~ such that rankB(z') = L for any z' ~ % .
(8.5.16a)
Such adjustment problem will be called well-posed. Let us designate H = M- L ;
(8.5.17)
we have 0 < H< I.
(8.5.17a)
[Indeed, L < M by (8.5.15a). If we had H > I thus M > L+I then, at z ~ ~ we should have L linearly independent columns of B at most, thus L + I linearly independent columns of Dg(z) at most, which would contradict the hypothesis of regularity.] If the problem is well-posed then also H is constant on any ~ ; it can be regarded as a 'degree of redundancy', as it was in the linear case. The
273
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
theoretical analysis shows that the set M § is again of 'dimension' I-H, but it can happen that it does not have all the properties of a differentiable manifold; only when the solution manifold M i s restricted to some neighbourhood of an arbitrary z o ~ M , its projection into the x-space has the required properties. The following results require a subtle mathematical reasoning and formulation. They are based on the fact that under the condition that rankB(z) = L on M, the mapping (projection) that assigns, to any z e M, its x-component according to (8.5.9) is, in mathematical terms, of constant rank thus a subimmersion of rank I-H. The consequences read. (a)
Locally, thus given an arbitrary z0 ~ M, in some neighbourhood V of z0 the set of x e R I such that
Y )~
VnMforsomey~
RJ
(8.5.18)
x
(projection of V ~ M into the x-subspace R ~) is a differentiable manifold of dimension l-H, a submanifold of R~; compare with (7.3.3)-(7.3.4) where M-L = H.
(b)
Given any i e M § (8.5.12), the set of N-vectors z such that
z=
/y/ i
~ M"
(8.5.19)
(section o f M at constant i) is a differentiable manifold of dimension J-L, a closed submanifold of M ; compare with the fine-printed paragraph following after (7.3.10).
(c)
Under the assumption (8.5.16), given
z0=
I r~ )
e M
(8.5.20)
i0
the neighbourhood V in (8.5.18) can be taken as Cartesian product of J-dimensional interval % and/-dimensional Vx (thus V= Vy • Vx) in the manner that the set
Vy m M(io )
(8.5.21)
is a differentiable manifold of dimension J-L, a closed submanifold of Vy; see (8.5.13) and compare with (7.3.9)-(7.3.10). In particular if L = J then, (at least) in a sufficiently small neighbourhood of Y0, the set (8.5.21) equals {Y0 } thus the solution in y is unique. If we now restrict ourselves to a neighbourhood V = Vy x Vx of some z 0 e M , the result (a) implies that the solvability condition (8.5.18) can be written
2'/4
Material and Energy Balancing in the Process Industries
x ~ Vx:h(x)=0
whereh=
/hi/
and rankDh(x) = H ;
(8.5.22)
(8.5.22a)
hence there exists some function h with full row rank Jacobi matrix, determining the manifold (8.5.18) by the condition (8.5.22). Further, the result (c) says that given some x = i obeying the solvability condition, the set Vy n M(i) of solutions in y at fixed ~ is determined by the condition y e Vy" f(y) = 0
where f =
/'/
and rankDf(y) = L;
(8.5.23)
(8.5.23a)
hence there exists some function f with full row rank Jacobi matrix, determining the manifold of solutions in y (e %). The function f depends on f~ (not written explicitly). Moreover, from the condition (8.5.16a) it follows that V(= Vy• Vx) can be taken such that some L rows of matrix B remain linearly independent in '~, the other M-L rows being their linear combinations at any z ~ 'E. With an appropriate order, let g~, ..., gL be the corresponding components of g (8.5.8). Then the equations
Ye %:gl
/'/ ~
--0, "'", gL
/yl
--0
(8.5.24)
in y, at fixed ~, determine again a closed submanifold of Vy, say M'(x). One has clearly Vy n M (~) c M' (~); tracing a curve on M' (~) starting from a point y e Vy n M (~), one can show that the curve remains on M (:~). One concludes by topological arguments, using the result that Vy n M (~) is a connected component of M '(~). Restricting Vy when necessary, one thus shows that the equations (8.2.24) also determine Vy n M (i), thus the set of solutions in y. Hence the conditions (8.5.23) can take the special form (8.5.24). The beauty of m o d e m Analysis has also certain flaws. One of them is in that m a n y theorems are only existence theorems, and often of local character only. An existence theorem states for example that a solution exists under certain conditions, but the verification of the conditions in practice is frequently not less difficult than finding a solution directly by way of trial. In addition, an existence t h e o r e m need not indicate a practically feasible way of finding the solution. M o r e o v e r , a local theorem states only that (expressed in rather vague terms) the solution exists and is unique only if the 'initial guess' in a numerical procedure is 'not too bad'; else the procedure can fail. So in the best case, a theoretical analysis gives an idea of what can be expected, and perhaps suggests a strategy.
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
275
In terms more pragmatical, the above theoretical results can be interpreted as follows. We have some idea of where a solution of the problem can be found; it is a neighbourhood of some (assessed) value z 0 of the state variable z, obeying the constraints (8.5.8) thus g(z 0 ) = 0. Let
v = % x Vx
(8.5.25
be this neighbourhood (interval estimate); Vy is a J-dimensional interval of the y-variables, Vx an/-dimensional interval of the x-variables, according to (8.5.9). We assume that the model is regular (8.4.6); this is the case with a set of balance equations, as shown (under certain hypotheses) in Sections 8.2-8.4. We further suppose that the problem is well-posed (8.5.16). We then expect that with our interval estimate, the solvability condition reads x = ~, where :~ is some solution of the set of equations (8.5.22). This means that at least hypothetically, the equation (8.5.22) can be obtained by elimination of vector variable y from the original constraints (8.5.8). The theory also shows that if the interval Vx is sufficiently small, the vector equation (8.5.22) with (8.5.22a) is equivalent to a set of scalar equations x~ = X1 (xH+~, "- , x i ) . . . . . . . . . . . . XH
-- S H(XH+I,
'X• ...
,
(8.5.26)
V x
x I)
for an appropriate selection of the H variables Xl, "'" , XH with the corresponding re-ordering of the x-components. The number H is uniquely determined, while the selection of the 'dependent' variables Xl, " . , xH is generally not unique, but also not arbitrary. Consider a simple example where I = 2 and H = 1. Let the set (manifold) of solutions of (8.5.22) look like
fI I I I I I I
i
I'- . . . . . . .
1
,
I
I_
Fig. 8-8. Possible manifold (curve) of solutions to (8.5.22)
276
Material and Energy Balancing in the Process Industries
In Vx, we can take X1 as dependent (uniquely) on x2, but not conversely. Taking a smaller interval, say Vx, x 1 depends on x 2 , or also conversely. Generally, any set of H variables (say, x~, --. , XH ) that are uniquely determined by the remaining ones according to (8.5.26) can be called 'redundant' in Vx. As shown, however, this concept of a 'redundant variable' can depend on the choice of Vx . Anyway, the (invariant) number H (8.5.17) can be called the degree of
redundancy. Let further some x = ~ obey the solvability condition (8.5.22). We then expect that with our interval estimate (8.5.25), the set of solutions in y will be determined as that of certain L equations (8.5.24) for an appropriate selection of some L components gl, "'", gL of function g. More generally, having eliminated the variable y in certain H scalar equations, some (M-H =) L equations remain. The H scalar equations (8.5.22) and the L scalar equations (8.5.23) represent the result of such (perhaps only hypothetical) elimination; they obey the conditions (8.5.22a) and (8.5.23a). The number L is again uniquely determined. More explicitly, let us write the equations (8.5.23) as dependent on fl (Yl,
"'" , Y J ; I~) = 0
(8.5.27) fL (Yl,
"'" , YJ; IK) -" 0
where the parameter ~ has been fixed; Yl, "'" , YJ are the unknowns. Again, if the interval Vy is sufficiently small, the equations (8.5.27) are equivalent to a set of equations Yl = Y1 (YL+I,
"",
YJ; x) (8.5.28)
YL = YL(YL+I, "'", YJ;s for an appropriate selection of the variables Yl, YL with the corresponding re-ordering of the y -components. The number J-L represents the number of degrees of freedom for the vector variable y, given ~. Observe that if J - L, thus if matrix B is of full column rank then (assuming y e Vy ) the whole vector y is uniquely determined by ~. In that case, for a well-posed problem, rankB(z) = L - J for any solution z e M, hence the conclusion is independent of the special value of ~. More generally, it can happen that some of the equations (8.5.28) is of the form "'"
yj = yj (~,)
,
(8.5.29)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
2'/'/
thus the j-th variable is uniquely determined by the given ~,, whatever be the other yj. (j'~j). We then can call yj 'observable' (in Vy ) at x = ft (~ V x ).
8.5.3
Theoretical classification
Even for well-posed problems, only an incomplete classification of variables is meaningful, if it has to be independent of the particular choice of point z 0 ~ M. Let us introduce two formal definitions. (i)
The j-th u n m e a s u r e d variable (yj) is called observable when
Yl__ [y =
_
/Y'l e M (~) and y' =
Yj
9
e M (~)] implies yj = yj (8.5.30)
~,Y'j
w h a t e v e r be f~ ~ M§ recall (8.5.12 and 13). Hence given any :~ obeying
the solvability condition, the j-th unmeasured variable is uniquely determined. (ii)
The definition of a nonredundant variable (xi) is trickier. Let us first have some solution
f~ =
/'/
~ M.
(8.5.31)
The idea of nonredundancy is that leaving Xh = 2h constant for all h ~e i and changing x i , the equation (8.5.8) with (8.5.9) remains solvable: the variable x~ is not determined by the remaining 2h, and even arbitrary, with the condition
Xi E ,(I/'i
(8.5.32)
where '~i is the interval of admissible values; see (8.5.8) where the admissible region U is Cartesian product of onedimensional intervals. Moreover, we shall require a 'smooth' solvability when xi varies: There exists a curve on Mpassing through f~ and leaving the coordinates Xh -- 2h constant for h ;e i, while xi takes all the possible values in ,~i; 'possible' means that given xi ~ ,~i, there exists some point on M with i-th measured component xi. We then call the variable xi nonredundant at
278
Material and Energy Balancing in the Process Industries
point ~. The i-th measured variable is called nonredundant when it is nonredundant at any ~ ~ M .
The classification criteria can be based on the properties of the Jacobi matrix (8.5.10). Alas, the analysis requires again a subtle mathematical reasoning. Definition (i) Let us designate S M ( i ) the section of M a t constant ~, thus the set (8.5.19); let us trace an arbitrary curve on the manifold SM(:~). Let
be a parametrisation of the curve, thus x = ~ and y = cp(t), with components yj = q)j (t) (j = 1, ..., J). Denoting by ~0' the derivative, by (8.5.8) with (8.5.10) we have
(8.5.33)
B(z)q~'(t) = 0
for any such curve. If now the variable yj is observable then necessarily q~j is constant, hence cp~ = 0. Thus conversely, whatever be z e 914and v ~ 1~J B(z)v = 0 implies vj = 0
(8.5.34)
because (:~ ~ M § being arbitrary) otherwise we could trace a curve on SM(~) not obeying the condition cpj = const. The condition (8.5.34) is necessary for yj to be observable. It is also sufficient if the manifold (section) SM(:~) is (topologically) connected. More generally, it is sufficient at least for yj to be locally observable at any "2 ~ M . This means that having arbitrary
'2 =
i
~ M(thus S' e M(~))
(8.5.35a)
there exists some J-dimensional open interval Vy' such that ~, ~ ~' and y ~ Vy' n M ( i ) implies yj = ~j.
(8.5.35b)
Observe that Vy' can be different for different '2, in particular for different ~. Moreover, let the condition (8.5.34) be obeyed also in some N-dimensional neighbourhood ~ of an arbitrary z e M . Then, given arbitrary '2 (8.5.35a), there exists some neighbourhood ~ x Vx of ~ (a Cartesian product of intervals) such that whatever be x~Vx [y e % n M('~) and y' e % n M(:~)] implies yj = y] .
(8.5.35c)
This is the condition (8.5.30) restricted to M ~ ( ~ x Vx ); here, ~ is independent of x (~ Vx). The assertion can be proved using the equations (8.5.24) and the implicit function theorem, along with the hypothesis (8.5.16).
279
C h a p t e r 8 - Solvability and Classification of Variqbles H - Nonlinear Systems
Definition (ii) Let us further consider a nonredundant measured variable xi. Let again i ~ M (8.5.31). We have a curve on M , parametrized as tp(t) / 7(0 =
~(t)
with 7(0) = i and ~h (t) = q/h (0) = Xh for h # i
(8.5.36)
q/i ( t ) = xi + t where t is in some interval such that ~i + t ~ :c/~ (8.5.32). Let e~ be the i-th unit vector of R I (in the x-space), and with the partition (8.5.10) let
(8.5.37)
a i = Ae i
be the i-th column vector of matrix A (a function of z). The condition 7(0 r M thus g(7(t)) = 0 reads B0'(t))tp'(t) + ai 0'(t)) = 0
(8.5.38)
thus in particular, at t = 0 a~ (i) = - B(i)tp'(0)
(8.5.39)
where i is arbitrary. Thus the necessary condition reads: a~ (z) is element of the vector space generated by the columns of matrix B(z), whatever be z ~ M . Conversely, let us assume that the condition is fulfilled in some N-dimensional neighbourhood Vz of any i e M . Thus, whatever be z ~ Vz , there exists some vector v(z) ~ R J such that a i (z)
=-
B(z)v(z) .
(8.5.40)
Assuming again that the problem is well-posed, we can take Vz such that there are certain L columns of B that remain linearly independent. We thus can take v(z) as the vector of coordinates of ai (z) relative to these L columns (constituting a basis), the remaining components of v(z) being zero. We thus have a continuous vector field v(z) on Vz. Let us consider an integral curve of the field, parametrized as 9(t), and then a curve
7(0 =
9(0) V(t)
such that 7(0) = i and ~'(t) = e i .
Then, so long as z = 7(0 e d dt g(T(t)) = Dg(z)y'(t) = B(z)v(z) + a i (z) = 0 by (8.5.37) and (8.5.40), thus 0 = g(i) = g0'(0)
(8.5.41)
280
Material and Energy Balancing in the Process Industries
hence T(t) ~ M for any t. We thus have a curve on M passing through i and leaving xh = ~h (t) = ~h(0) = Xh constant for h ~: i, while xi = ~ (t) takes all the values in some neighbourhood of Xi limited by the condition
(8.5.42)
7(0 6 ~ .
This holds true whatever be i ~ M . By the way, replacing i by z 1 = 7(t) ~ M for some t ~: 0, the curve can be continued, and so on. We shall not examine the conditions under which we thus obtain a 'maximal curve' such that finally x~ takes all the possible values in ,c/i (8.5.32). We simply state that the condition (8.5.40) is sufficient for x i to be (at least) locally nonredundant at any i ~ Yv~ thus nonredundant on Vz n M.
The interpretation of the theoretical results, remitting again the mathematical precision, can read as follows. We have a regular model (8.5.8) with full row rank Jac0bi matrix (8.4.6), and a well-posed adjustment problem, thus the partitions (8.5.9 and 10), where matrix B is of constant rank L, thus obeying the condition (8.5.16). We are usually not interested in all the possible values the state variable z can have theoretically, but rather examine a limited region, say an interval V (8.5.25) where our hypotheses are expected to hold. Instead of the full solution manifold M, we limit ourselves to some portion M n V o f M. Then: An observable unmeasured variable (yj) is uniquely determined by the measured variables' values (obeying the condition of solvability), say ~j = Yj (i) where :~ is the vector of (adjusted) measured values; the hypothetical function Yj need not be known explicitly. The necessary condition of observability is (8.5.34). Compare with (7.1.18) where we substitute B(z) for B, with variable z. According to (7.1.28)~, the condition is equivalent to rankB0)(z)=L- 1 (z~ Mn
V)
(8.5.43)
where L = rankB and where Ba) is the M x (J-1) submatrix of B with the j-th column excepted. The necessary condition requires the condition (8.5.43) to be fulfilled at any z e M ~ V. Under plausible mathematical hypotheses, the condition is also sufficient; else, it is sufficient only for yj to be locally observable according to (8.5.35). The local observability is rather a theoretical construction" it does not preclude the existence of another solution (say) y] for given ~, it only states that within some (not a priori known) finite distance from ~j, no other solution exists. [For the uniqueness of the solution in the (a priori assessed) interval V, it is sufficient to suppose that the condition (8.5.43) is fulfilled whatever be z e V, thus not only at points z obeying g(z) = 0; see (8.5.35c). But the latter condition can be too strong.] In particular if L = J thus if matrix B is of full column rank the condition (8.5.43) is obeyed at any z e V, where B is of constant rank by hypothesis. We
Chapter
8 -
Solvability and Classification of Variables II- Nonlinear Systems
281
then call the vector variable y observable (on M n V). Thus the whole vector y is uniquely determined by ~. A n o n r e d u n d a n t measured variable is not affected by the solvability condition; it can be freely varied in some interval leaving the model equations solvable, if the remaining fixed measured variables obey the condition of solvability. The necessary condition reads, according to (8.5.39) a i
(Z) E ImB(z) (z s M m V)
(8.5.44)
where ai is the i-th column vector of matrix A (8.5.10). Compare with (7.1.27) 2. Thus at any z ~ M n V, a i (z) is linear combination of the columns of B(z), thus in fact of certain L (= rankB) linearly independent columns. A sufficient condition assumes that ai (z) ~ ImB(z) at any z ~ V, thus not only at points z obeying g(z) = 0. The theoretical definition following after (8.5.31) is mathematically formal. In the applications (in particular in the statistical reconciliation of measured values), even the fact that the condition (8.5.44) is fulfilled at some z ~ M n V is relevant. Under frequent statistical hypotheses, the variable is then nonadjustable (at point z): by the reconciliation, the measured value can remain unadjusted (at least if the error is considered as uncorrelated with the other errors); see further Chapters 9 and 10. The reader has probably noticed that, in contrast to the linear case, we have not completed the classification by introducing 'unobservable' and 'redundant' variables. The main reason is that we have not considered and classified all the possible cases that can occur theoretically. Still, let us at least examine the cases where some of the above necessary conditions is not satisfied. Going back to (8.5.43), let conversely rankB0~ (z) = L at some z ~ M n V .
(8.5.45)
That means that some set of L (= rankB) columns of B(z), not comprising the j-th column constitutes a basis of ImB(z); the L column vectors are thus linearly independent. By standard arguments, one concludes that the equality (8.5.45) holds true also in some neighbourhood of point z. We thus can state that the variable yj is not observable. It is not even locally observable, because the condition (8.5.43) is necessary even for local observability. The statement (8.5.45) thus 'disqualifies' the j-th unmeasured variable: we cannot expect that with an arbitrary measured (and adjusted) ~, the value of yj will be determined. It can happen that the condition (8.5.43) is fulfilled at certain particular values of z, and even that the yj-value is uniquely determined by some ~; see the example 4 in Section 8.1, Fig. 8-2. But such case is exceptional, due to some coincidence. It is left to the reader's taste, if he then will call the variable 'unobservable' or perhaps 'observable at' some ~.
282
Material and Energy Balancing in the Process Industries
Let us further return to (8.5.44) and let conversely a i (Z) ~ ImB(z) for some z ~ M n V
(8.5.46)
Thus adding the column a i (Z) to those of B(z), the rank of the extended matrix equals L+I. Again by standard arguments, one concludes that a i (Z') ~ I m B ( z ' ) for any z' in a neighbourhood of z. We can say that the variable xi is not nonredundant, or perhaps 'redundant' in some neighbourhood of z. The variable will generally be adjusted by reconciliation, with possible exceptions mentioned above, after formula (8.5.44) (end of the paragraph).
Remarks
(i)
The theory presented in this section applies to any regular model and w e l l - p o s e d adjustment problem, not only to balance equations. As already mentioned, it is in fact sufficient to assume that the function g is twice continuously differentiable. On the other hand, according to Section 8.2, at least in case of component mass balances the set M of solutions is even an 'analytic manifold', and it is such also at least if simple mathematical expressions are used for the enthalpy functions in the whole balance model. In that case, certain stronger conclusions can be drawn from the theory. The parametrisations introduced in Sections 8.2 and 8.3 allow one to suppose that the manifold M is (topologically) connected, and to use the theorem of analytic continuation: if an analytic function equals zero in an open subset of a connected region R then it equals zero in the whole R An analytic function of the state variable z is also an analytic function of the parameters, which can be assumed to lie in a connected region R of dimension D (number of degrees of freedom). By the (analytic) diffeomorphism, to an open subset of M corresponds uniquely an open subset of R . In particular if some determinant of a (sub)matrix (function of z) equals zero in some open subset of M then it equals zero in the whole M. Thus if the rank of some matrix M(z) equals (say) K in M n V where V is open in the z-space 11N then rankM(z) < K on M ; indeed, the determinant of any (K+ 1) x (K+ 1) submatrix (if there is any) equals zero in M ~ V, thus everywhere in M (but not necessarily in the whole admissible region U c 1~y , nor in V). The rank can be lower, however. Then the same theory shows that the points z e Mwhere rankM(z) < K are 'rare' in M; they will be contained in some 'negligible' subset of M, of 'lower dimension' than D = dimM. We shall not precise the latter concepts.
The basic hypothesis adopted in this section is that of 'well-posedness' (8.5.16). Let now M be analytic. The hypothesis then implies rankB(z) < L for any z ~ U
(8.5.47)
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
283
where U is the admissible region in (8.5.8). Let further the condition (8.5.43) be fulfilled for all z e M n V0 where V0 is an arbitrarily small open N-dimensional interval; then the rank is < L-1 everywhere on M , thus equal to L-1 because rankB(z) = L on Mby hypothesis. Hence if the unmeasured variable yj is (locally) observable in a neighbourhood of some point it is (at least locally) observable on the whole solution manifold M. Conversely if we have (8.5.45) at some arbitrary z e M then (as the rank is < L everywhere on Mby hypothesis) the rank equals L 'almost everywhere' on M. Thus if yj is not (locally) observable at some point, it can be observable at most in some 'exceptional' subsets of M. Thus for well-posed problems (and analytic manifolds), the classification observable / not observable (unobservable) is 'almost complete'. The remaining cases ('exceptional observability') represent mere coincidence. Briefly, an unmeasured variable is either
everywhere 'observable'
or
almost everywhere 'unobservable'
where the quotes recall that mathematical precision has been remitted. Retaining again the well-posedness and analyticity hypotheses, let the condition (8.5.44) be fulfilled for all z e M n V0 where V0 is again an arbitrarily small open N-dimensional interval. Hence the rank of the extended matrix (B(z), a i ( z ) ) equals L on M n V0 , thus it is < L everywhere on M and being also > L (as rankB = L by hypothesis), it equals L on the whole M. The stronger hypothesis, namely that the condition is fulfilled in some V0 open in R N, implies as well that the condition is fulfilled in some neighbourhood of the whole M where rankB = L by hypothesis. Thus if the measured variable is (by the formal definition) nonredundant in a neighbourhood of some point, it is nonredundant on the whole M. According to the terminology introduced in the text following after formula (8.5.44), if the variable is nonadjustable in a neighbourhood of some point then it is nonadjustable on the whole M. Conversely if we have (8.5.46) at some arbitrary z e M then the rank of (B(z), ai (z)) equals L+ 1 thus (being < L+ 1 everywhere on Mby hypothesis), it equals L+ 1 almost everywhere on M. Thus if xi is not nonredundant (in simpler terms, 'redundant') at some point, it can be nonadjustable (or even nonredundant) at most in some 'exceptional' subsets of M. Thus again, for well-posed problems (and analytic manifolds), the classification 'nonadjustable'/'redundant'(not nonredundant) is 'almost
284
Material and Energy Balancing in the Process Industries
complete'. The remaining cases ('exceptional nonadjustability') represent again mere coincidence. Briefly, a measured variable is either
everywhere 'nonadjustable'
or
almost everywhere 'redundant'
where the quotes mean again that mathematical precision has been remitted. But incidentally, it can happen that a variable classified as 'redundant' (almost everywhere) remains unadjusted at some point, though subject to measurement error. Recall also that the expression 'nonadjustable' is imprecise from the statistical point of view (being due to some special, though quite common statistical hypothesis); see further Chapters 9 and 10. (ii)
It is not our aim to introduce a new terminology. The terms '(locally) observable', 'unobservable', ' redundant','nonredundant (nonadjustable)' are common, but (in the nonlinear case) often only vaguely interpreted. A more detailed (and mathematically formal) classification can be found in Stanley and Mah (1981a). We have put up with a simpler classification and shown that and why it remains incomplete.
8.5.4
Classification in practice
In practice, the adjustment problem as formulated in Subsection 8.5.2 (see (8.5.11)) is most frequently a reconciliationproblem: some measured values (vector x + ) are adjusted (reconciled) so as to make the model solvable. The classification of variables gives one an idea of what can be expected from the reconciliation. Thus, first, the degree of redundancy H informs us on the number of independent constraints (scalar equations) the adjusted value ~, has to obey, thus how many measured variables are 'redundant' in the manner that having deleted their measurement, they will be still determined by the remaining measured values. In particular if H = 0 then all the I measured values are necessary (none is redundant). If it happens that H = I then the whole measurement is redundant because the constraints determine the I variables uniquely. Generally, not any H measured variables are determined by the other values, thus redundant; some of them can be nonredundant thus not subject to the constraints (solvability conditions), hence their measurement cannot be deleted. Under frequent hypotheses adopted by the statistical model of measurement, the nonredundant values remain unadjusted by the reconciliation; so they are also called nonadjustable.
Chapter 8 - Solvability and Classificationof Variables II- NonlinearSystems
285
Further, if some vector ~ of adjusted measured values obeys the solvability condition then given ~,, certain L independent constraints (scalar equations) are imposed upon the J components of the unmeasured vector y. The number J-L determines the number of degrees of freedom for the unmeasured variables. It can happen that certain unmeasured variables are uniquely determined by the latter constraints (thus by ~); they are called observable. In particular if L = J then there is no degree of freedom and all the y-variables are uniquely determined. If L < J then at least some of the unmeasured variables remain undetermined; they are called unobservable. The above intuitive concepts have a precise meaning when the model is linear. Then the variables can be classified a priori, and the partition of variables into measured and unmeasured (measurement placement) possibly modified. In any case (assuming 0 < H < /), the measured vector x § can be adjusted by standard reconciliation. The situation is not that simple when the model is nonlinear, as the previous analysis has shown. A well-posed adjustment (reconciliation) problem allows one at least to expect that a reconciliation procedure will converge to some adjusted value ~, if the measured x + is not ' too bad'. Then also an a priori classification of variables makes sense, based on the same ideas as in the linear case. The analysis of solvability and classification of variables is not so much a physical or technological problem, but rather a problem of computation relative to the mathematical model adopted. Observe that any model (even if regarded as 'rigorous') represents a mathematical idealisation of the reality. If we put up with a linear approximation, we can make use of the methods described in Chapter 7. We thus assess a 'representative' value z 0 of the state variable (taken for instance from the design of the plant) and in a neighbourhood of point z 0 , linearize the model according to (8.4.4). Then the model (8.5.8) reads By + Ax + c = 0
(8.5.48)
where vector z has been partitioned according to (8.5.9), and Dg(z 0 ) = (B, A)
(8.5.48a)
is the corresponding partition (8.5.10) of the Jacobi matrix at z = z 0 . We then have c = g(z 0 ) - Dg(z 0 )z 0 ;
(8.5.48b)
of course when z 0 obeys the constraints (model equations), we have g(z 0 ) = 0. Then (8.5.48) is the linear model (7.1.1) with (7.1.9 and 10). Transforming the matrix (B, A, c) (7.2.1) according to Section 7.2, the analysis including the variables classification is complete; see the before-last paragraph of Section 7.2
286
Material and Energy Balancing in the Process Industries
before Remarks. The analysis is, of course, complete only if the linearized model (8.5.48) is applied henceforth to any set of measured values to be reconciled. Let now the model be nonlinear. Then the Jacobi matrix depends on the unknown vector z and the reconcilation consists of a number of steps, say of a sequence of approximations z(n); if the sequence converges then the limit value, say ~, represents a point on the solution manifold M, thus an estimate of the actual value of the state vector. So as to have an a priori idea of what can be expected, one can proceed as follows. We suppose that the state vector z can take its values in some N-dimensional interval V c U where U is the admissible region (8.5.8). The interval can be assessed as some neighbourhood of a vector z0 ~ M. A first information can be obtained in the same manner as above, in the linear case. Taking different z0 ~ M, we can examine the behaviour of the Jacobi matrix Dg(z 0 ) on M (restricted to V, thus on M n V ). [We can also, in the case of balance models, start from different values of the independent parameters representing the degrees of freedom and determining z 0 ~ M; see Sections 8.2 and 8.3. But such procedure may be rather tedious.] In the reconciliation, however, also the behaviour of Dg(z) in a neighbourhood of the solution manifold is relevant. The nonlinear reconciliation starts from some initial guess, say z +. The x-component is the measured x +, but also some initial guess y+ of the unmeasured subvector y is necessary; generally, z § ~ M. We also do not know a priori if the vector z will be determined by the reconciled ~, (thus observable). There are methods that allow one to find some ~ ~ M, 'as close as possible' to the initial z § even if y is not observable; see further in Section 10.4. The analysis (Veverka 1992) also shows that if matrix B (8.5.10) is not of constant rank in a neighbourhood of manifold M, it can happen that a sequence of approximations will not converge. The adjustment problem assuming constant rankB (8.5.16) has been called 'well-posed'. In the interval V, let us select randomly a number of initial guesses z +. Starting from any such z +, let us compute ~ as suggested. If the sequence of approximations converges for any z +, it is plausible to assume that the problem is well-posed (in the a priori assessed region V). The divergence (or oscillation) of the approximations signals that the problem may be not well-posed in V. Of course the reason can be also in that some z + is too distant from the solution manifold (a 'bad' initial guess). In the sequence of approximations z (n~,the Jacobi matrix is computed and transformed according to Section 7.2. Thus in particular the rank of B at each z (n~ is known. Observe that it can happen that the rank is not constant and still, the sequence converges, perhaps by lucky chance. But if such case is detected, the problem is still not well-posed, by definition. Conversely (and more likely), it can happen that the sequence does not converge, while the ranks of all the B(z ~n~)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
287
are constant. The reason can be a bad initial guess as mentioned above, or again that the problem is not well-posed. The points where the rank of B is lower than the maximum rank are 'rare' in V. Still, as a detailed analysis shows, also in a neighbourhood of such points the matrix B has certain unfavourable properties; see again Veverka (1992). The reader can also imagine the elimination: Certain rows are annulled, but 'what is zero'. Near the 'singular points', the zero becomes uncertain (some subdeterminants are 'nearly zero'). Let us have come to the conclusion that the problem is well-posed. We thus know the constant L (= rankB), thus the number of degrees of freedom J-L for the unmeasured variable y, and also the (constant) degree of redundancy H = M-L (M is the number of scalar equations). So as to draw further conclusions according to Remark (i) to Subsection 8.5.3, let us assume that the manifold M is analytic. That means we consider balance models with simple enthalpy functions, thus algebraic expressions that can be formally extended beyond the limits where they make sense physically (so-called analytic continuation). Further information will be obtained after the last approximation step, thus at points ~ ~ M corresponding to different initial guesses z § We thus know Dg(~) decomposed according to (8.5.10), and transform it to the canonical format according to Section 7.2. See now the before-last paragraph of Section 7.2, before Remarks. According to points (v) and (vi), at each ~, we find the partitions of measured and unmeasured variables, thus their respective classifications. The conclusions will be the following. (a)
If some measured variable x i is classified as nonredundant at each "2 then, almost certainly, it is nonadjustable on the whole V n M (portion of the solution manifold we are interested in)
(b)
If some xi is classified as redundant at some ~ then it is not nonredundant, thus (having simplified the terminology) redundant on the whole V n M, with possible exception of some 'rare' points, due to some coincidence.
['Nonadjustable' means here 'nonadjustable by statistical reconciliation assuming uncorrelated errors'; see Chapters 9 and 10.] Further
(c)
If some unmeasured variable yj is classified as observable at each ~ then, almost certainly, it is (at least locally) observable on the whole V n M
(d)
If some yj is classified as unobservable at some ~ then it is not (even locally) observable, thus (having simplified the terminology)
288
Material and Energy Balancing in the Process Industries
unobservable on the whole V n M, with possible exception of some
'rare' points, due to some coincidence. The wording 'locally' admits of possible other solutions in yj, in some nonnull distance from the estimated value. This is rather a theoretical possibility. In practice, such solutions will most likely represent values not admitted by the technology. The 'rare' ('incidental') points of V n M form certain subsets of 'lower dimension' than D = dimM; imagine isolated points or curves on a surface as a simple illustration. Their presence will, most likely, not be detected by the procedure. It remains, however, at least theoretically. In the case (b) above, in a neighbourhood of the possible 'rare' points, the variable will be 'almost nonadjustable': if an estimate falls into this neighbourhood, the estimated "~i will only slightly differ from the measured x + even if subject to a gross error. Such case can occur in the reconciliation and cannot be avoided by the a priori classification. See later Section 10.5, Remark. Nor can be avoided the cases that for a problem qualified as well-posed, the reconciliation procedure still fails. The only possibility is then to discard the corresponding set of measured data. The possible existence of the 'rare' points, in contrast to the linear case, does not allow one to conclude simply that, for instance, "deleting the measurement of a redundant variable makes it observable"; it can happen that the problem becomes 'not well-posed'. This can also happen when adding the measurement of an unmeasured variable classified as unobservable by the above method (and using the simplified terminology). Compare Examples 4 and 1 in Subsection 8.5.1, where Q - 0 is admitted: if the 'exceptionally observable', else unobservable unmeasured variable T 2 is measured, the originally well-posed problem has no more this property. Thus having changed the measurement placement (having added or, conversely, deleted some measurement), one ought to test if the new adjustment problem is well-posed; one can use again the procedure as above.
8.6
MAIN RESULTS OF C H A P T E R 8
The solvability analysis of a set of nonlinear equations is by far not that straightforward as it was in the case of linear models in Chapter 7. The less straightforward and unambiguous is a solvability classification of variables, which was uniquely determined by the linear model and the partition of variables into 'measured' and 'unmeasured'. This holds even in the case of balance equations having a simple structure; see Section 8.1. Although rather tricky, the structure of the set of balance equations can be analyzed; see Sections 8.2 and 8.3. The complications are mainly due to the
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
289
presence of reaction nodes, splitters, and to certain a priori technological assumptions precluding the presence of certain chemical components in certain streams; see Section 8.2. We have again (cf. Chapter 4) denoted by Ek (k = 1, .--, K) the set of material streams where component Ck can be present. The arbitrariness in the choice of the E k has been limited by the structural hypotheses (8.2.18), (8.2.22), and (8.2.29) motivated by technological arguments as plausible and not very restrictive. Formally, they can be verified according to the points (a)-(k) following after (8.2.32). Then the set Yd of solutions can be 'parametrized', i.e. the solution z can be expressed as function of certain selected component mass flowrates mki (8.2.6), splitting ratios %, (8.2.12), and component production rates mk(n) (8.2.7) in reaction nodes; see the points (a)-(g) in Subsection 8.2.4. The number D of the parameters represents the 'number of degrees of freedom' for the variables in the set of component mass balance equations. The results are summarized in Subsection 8.2.5, with Remarks 8.2.6 and Example 8.2.7. No further structural complications arise when the constraints are extended by the energy ('enthalpy') balance equations; see Section 8.3. The structural hypothesis (8.3.2) has been motivated in Section 5.2 as plausible and can be weakened, as remarked at the end of Subsection 8.3.1; one adds the conventions (a)-(c) leading to (8.3.3). The specific enthalpies /2p of material streams j are generally considered as functions (8.3.18) of temperature T j, composition 3~(mass fractions of chemical components in stream j), and pressure PJ. Here, we assume that the state of aggregation in each stream is given a priori, and for simplicity, also the pressure PJ (if relevant as a thermodynamic state variable) is assumed to be a priori known thus is not written explicitly as a variable; regarding certain PJ as variables would only increase the number of parameters ('degrees of freedom') without changing the number of equations. The thermodynamic condition of positive specific heat (8.3.19) is formally adopted also for the specific enthalpy functions fJ as given in the database. Then the extended vector z of solutions can again be expressed as function of the D parameters introduced in Section 8.2, plus certain additional D h parameters that are certain selected temperatures of material streams and net energy flowrates q~ (8.3.21). The s u m O t o t -- D + D h is the total number of degrees of freedom for the variables subject to the components mass and energy balance constraints. The results are summarized in Subsection 8.3.2. The parametrisation of the whole set ~ftot of solutions is not unique (i.e. the selection of the parameters is not unique), only the number of degrees of freedom (Dtot) is invariant. In mathematical terms, the set Mtot is a differentiable manifold of dimension Dtot; it is called the solution manifold of the set of balance equations. The main result of the structural analysis is that the set of equations (constraints) (8.2.2) and (8.3.1) is minimal by (8.3.30): the number of degrees of freedom equals the number of variables minus the number of (scalar) constraints.
290
Material and Energy Balancing in the Process Industries
Using the notation introduced in Chapters 4 and 5 (summarized in Sections 4.8 and 5.7), the minimal set o f constraints can be arranged as follows. We designate (8.6.1)
n k (n) - - Z Cniy~mi/Mk i~Ek
which is (4.8.8) with (4.8.5) where y~ - 0 if i ~ Ek. The terms are introduced for any node n ~ T u (non-splitter), and for the K(n) components Ck present in the node n balance thus in some stream incident to n. The K(n)-vector of components nk(n ) is n(n). On the vector n(n) operates the matrix D(n); see the text that follows after (4.8.9), and also (4.8.11). Then the constraints read k-1,...,K J ~ Ju, J ~ Ek"
Y~, = 0
(8.6.2a)
k-1,...,K s ~ S , j~ ~ E k 9
y~,~- 0
(8.6.2b)
y~?- y~,- 0
(8.6.2c)
J ~ Ju"
K Z y~,- 1 - 0 k=l
(8.6.2d)
s ~ S 9
K Z y~s_ 1 - 0 k=l
(8.6.2e)
C"m' = 0
(8.6.2f)
q = 0
(8.6.2g)
Sfi' - 0
(8.6.2h)
D(n)n(n) = 0
(8.6.2i)
Cu (diagmu)hu + C ' ( d i a g m ' ) h ' + Duq = 0
(8.6.2j)
k=l,...,K s ~ S , j ~ J~"
9
De
n e Tu 9
where we recall that for any two vectors a - (a~, ..., a N)T and b = (b~, ..., b N )T we have (diaga)b = (diagb)a = (al b l , "'", aN bN )T. In the graph G[N,J] of material streams, S is again the subset of splitter nodes, T u that of units that are not splitters, J' ( c J) is the subset of material streams incident to some splitter, Ju = J - J'; the set J' is partitioned into subsets J~
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems m
291 m
of streams incident to splitters s, j~ (~ J~ ) is the input and J~ ( c Js ) the set of split output streams for splitter s. For the submatrices C u , C', C" of the reduced incidence matrix C of G see (5.7.2a and b); the vector m of mass flowrates mj is again partitioned into m u (j ~ Ju ) and m' (j ~ J'), while hu resp. h' is the corresponding vector of specific enthalpies/T for j ~ Ju resp. j ~ J'. The reduced incidence matrix D of graph GE [NE, E] (5.7.1) of net energy streams is again partitioned into submatrix D u (nodes n ~ Tu) and De (nodes n ~ DE) where D E is the set of energy distributors (possibly empty); q is the vector of net energy flowrates qi (i E E). The equation (8.6.2h) with S according to (5.2.12 and 13) represents the scalar equations - ~ + / T = 0 (s ~ S, j ~ Js ). By (8.6.2c) and assuming also equal pressure PJ = PJ~ (j ~ Js) in streams incident to splitter s, the equation is equivalent to the condition of equality of temperatures s e S, j e Js" Tj~ - Tj - 0
.
(8.6.2h)*
We have thus re-arranged the equations in the manner that Eqs.(8.6.2a-g) are linear, and Eq.(8.6.2h) 'quasilinear', equivalent to the linear subsystem (8.6.2h)*. Observe that the formally written equations (8.6.2a and b) are, in fact, simple instructions (equalities) >~put y~, = 0 ~. The LH-sides of Eqs.(8.6.2) constitute the function g in the model g(z) = 0
(8.6.3)
where z is the vector of model variables (mass flowrates, net energy flowrates, mass fractions, and temperatures) subject to the balance constraints; here, hu and 11' are regarded as functions of the mass fractions and temperatures (given the pressures and states of aggregation). We have included as variables all the mass fractions y~ (j e J, k = 1, 9.. , K), for the sake of formal simplicity. By (8.6.2a-c) however, we have y~ = 0 whenever j ~ Ek; the latter variables are thus always 'observable', i.e. their values are uniquely determined by the model. Recall that a correctly set-up list Ek must not admit the case where, for instance, Js e Ek but j ~ Ek for some J ~ Js. In the solvability analysis, we have adopted the condition of positive mass flowrates mj>0foreachj~
J
(8.6.4)
with the natural assumption that the model admits such solution. Then, with all the structural assumptions fulfilled, the dimension Dto t of solution manifold ~V[tot equals D+D h where D is the number (8.2.78) and D h the number (8.3.23); here, IMI is number of elements of general set M and in addition Juk is the set of streams j ~ Ju ~ Ek, Sk the set of splitters where component C k occurs, K(n) the
292
Material and Energy Balancing in the Process Industries
number of components present in the node n balance, and R o (n) the dimension of the reaction space in node n (R0 (n) = 0 for a nonreaction node). If some unit is a heat exchanger, it has been partitioned into two nodes, say n' and n"; see (8.3.32). In the energy balance, if the heat transfer rate qi between n' and n" is not given a priori, it can be deleted as a variable by merging the two nodes. The procedure is described in detail in Subsection 8.3.3. We introduce the subset Eex ( c E) of net energy streams i to be deleted by the merging, the set of nodes h i (i ~ Eex ) of the corresponding exchangers, and the subset T~ ( c Tu ) of the remaining units. Then the submatrix C u (5.7.2a) is reduced (8.3.37)
(Cu,
c'*)
(8.6.5)
to the matrix of rows (nodes) n ~ T~, and h~(i ~ E~x ). Having merged the nodes also in the graph GE, in the matrix D the submatrix D Ois reduced to the same rows as in (8.6.5), and by the deletion of arcs i ~ Eex to columns i ~ E* = E-Eex ; we thus have D~. Also in the submatrix De, the columns i ~ Eex are deleted and the new submatrix is D~; see (8.3.38). Then the equations (8.6.2a-f) remain, instead of (8.6.2g) we have Deq = 0
(8.6.6a)
Eqs.(8.6.2h and i) remain, and instead of (8.6.2j) we have C~ (diagm u )hu + C'* (diagm')h' + D~q* = 0
(8.6.6b)
where q* is the remaining vector of net energy flowrates qi, i e E*. By the reduction and elimination, the dimension of the solution manifold (say) ~tot (thus the number of degrees of freedom) remains unaltered and is again Dtot (8.3.47). If we consider heat and mass balances only, the set of constraints (5.4.6) is minimal; see Subsection 8.3.4. The dimension of the solution manifold is Dtot = D + D h (8.3.50) where D h is the same as above (8.3.23), and D = I JI - I Nu I (8.3.49) where N uis the set of units; if certain components s(n) of vector s (source terms) are not given a priori, they represent additional degrees of freedom. The set Nu = T Ow S is again set up in the manner that both sides of any heat exchanger are considered separately, so as to take account of separate mass balances. We can again merge the couples of nodes {n',n"} in the energy balance of any heat exchanger, without changing the dimension of the solution manifold. If energy distributors and source terms are absent and if each qi (i ~ E) is a heat transfer rate in a heat exchanger, we have again the set of constraints (5.7.12). The equation (8.6.3) represents a nonlinear model. Generally, g is an M-vector of scalar functions gm of vector variable (N-vector) z. If the function g
Chapter $ -
Solvability and Classification of Variables H- Nonlinear Systems
293
is (at least) twice continuously differentiable, the properties of the solution can be examined using the Jacobi matrix Dg; see Section 8.4. The model is called solvable when there exists some solution z obeying g(z) = 0, uniquely solvable when this solution is a unique point z0 . If M (~ ~ ) is the set of solutions, the model is called regular when the Jacobi matrix Dg(z) is of full row rank (M) at any z ~ M (8.4.6). Then M is a differentiable manifold of dimension N-M (8.4.7). In particular the model (8.6.3) with (8.6.2) is regular, as well as the reduced models following thereafter. The Jacobi matrix of the balance model (8.6.3) has a special structure and its elements can be computed explicitly; see the formulae following after (8.4.9). The columns can be arranged according to the variables mj (j ~ J), y~ (j e J, k = 1, ..., K), TJ(j e J), and qi (i e E); the rows are arranged according to the scalar components gm of g, thus according to the equations (8.6.2). The elements in the rows corresponding to Eqs.(8.6.2a-g) are constants (+1 or 0), and if (8.6.2h) is replaced by (8.6.2h)* then also the elements in the latter rows are constants (+1 or 0). The elements in the rows (8.6.2i and j) can be computed as shown in (8.4.1 la) and illustrated after (8.4.1 lg), and in (8.4.14a); here, we make use of the developments by differentials (8.4.10). A special consideration is necessary if the enthalpy functions involve dependence on the mass fractions (8.4.16-18), and in particular if certain streams are multiphase mixtures; see Remark to Section 8.4. If the values of certain variables are a priori fixed, one can ask again, as in Chapter 7, which of the variables is redundant resp. nonredundant, and which of the unknown ones is observable resp. unobservable. Basically, such solvability classification of variables is possible and follows then the same lines as in Chapter 7, using the Jacobi matrix Dg(z) instead of the constant matrix C of the linear system; see Section 8.5. But since Dg(z) is no more constant, the classification can remain incomplete and need not be unambiguous; see the examples in Subsection 8.5.1. Theoretically, precise definitions and exact theorems can be formulated if the behaviour of the Jacobi matrix Dg is known in the whole admissible region U (8.5.8); in the balance model, the region is anyway limited by the conditions (8.6.4), and perhaps also by other inequalities. But even then, most of the theorems are of local character only (such as "the solution is unique in a neighbourhood of some point"); a global analysis by more advanced topological methods can be hardly thought of. The theory is presented in Subsections 8.5.2 and 3. In every case, the full row rank assumption is adopted for the matrix Dg(z), z e M. It holds true for the minimal set of the balance constraints. The vector z is again partitioned into x (fixed) and y (unknown). As in Chapter 7, x is called the vector of measured variables, y that of the unmeasured ones (8.5.9). Accordingly, matrix Dg is partitioned by (8.5.10) into B (operating on y) and A (operating on x). These conventions and notation are of constant use here and
Material and Energy Balancing in the Process Industries
294
also in the following chapters. The behaviour of matrix B(z) is of key importance for the analysis, and also for the numeric procedures suggested in Chapter 10. Given subvector x = x + in the partition of z, there need not exist any solution z ~ U of g(z) = 0 having this x § as subvector. The adjustment problem consists in finding some ~, such that the equation
g
y:~ / -
0
(8.6.7)
is solvable in y, and further that the difference i-x + minimizes some criterion; a special case is dealt with in Chapter 10 (reconciliation). Irrespective of the criterion, we can say that ~'makes solvable' the equation g(z) = 0. The set of making the equation solvable is denoted by M + (8.5.12). Given ~, ~ M +, we denote by M(~) the set of solutions y of Eq.(8.6.7). In particular, the latter equation can be uniquely solvable, but this property can depend on i. In the most favourable case, also the set M + and the sets M(:~) are differentiable manifolds; M ( i ) can also be a (set of) isolated point(s). Under certain assumptions, the theory is able to determine the properties of M + and M(:~) at least locally: restricting the admissible region to some N-dimensional open interval (say) V (thus formally U = V), the set M + is a manifold and for any ~ ~ M § M(:~) is a manifold whose dimension is independent of ~. One of the assumptions is that of constant rank of matrix B; we have called such problems well-posed. We then designate L = rankB
(8.6.8)
on 'E. Recall that M is the number of scalar equations and N the number of variables thus N = J + I where J is dimension of vector y and I that of x. We designate H = M- L.
(8.6.9)
Also this notation is used henceforth. It corresponds to the notation introduced for the linear systems. The number H can be regarded as the 'number of constraints' the variable x has to obey so as to make the model solvable, thus H is called the degree of redundancy and I-H is the 'number of degrees of freedom' for the variable x. The number L can be regarded as the 'number of constraints' the variable y has to obey, given some ~ ~ M + in (8.6.7), and J-L is the 'number of degrees of freedom' for the variable y; if L = J then the solution in y is (at least locally) unique. In the end, remitting the mathematical precision a 'most likely' classification of variables is possible using the methods of Chapter 7. The main
Chapter 8
-
Solvability and Classification of Variables II- Nonlinear Systems
295
results are summarized in Subsection 8.5.4. Basically, one applies the criteria of Section 7.2 to the model linearized at some point(s) of the solution manifold.
8.7
RECOMMENDED LITERATURE
As already stated in the introduction to this chapter, the present material is largely novel, and only a few relevant references are available. The neceessary mathematics is expounded in university textbooks; we have applied the theorems given in Dieudonn6 (1970). The approach to the observability/redundancy analysis as presented here can be characterized as equation-oriented; cf. Romagnoli and Stephanopoulos (1980), or Crowe (1989). For another (graph-oriented) approach, see Stanley and Mah (1981a and b), Kretsovalis and Mah (1988), summarized in Mah (1990). Crowe, C.M. (1989), Observability and redundancy of process data for steady-state reconciliation, Chem. Eng. Sci. 44, 2909-2917 Dieudonnr,J.(1970), Eldments d'Analyse III: 16.1-8, Gauthier-Villars, Paris Kretsovalis, A. and R.S.H. Mah (1988), Observability and redundancy classification in generalized process networks I and II (Algorithms), Comput. Chem. Engng. 7, 671-703 Mah, R.S.H. (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Romagnoli, J.A. and G. Stephanopoulos (1980), On the rectification of measurement errors for complex chemical plants, Chem. Eng. Sci. 35, 1067-1081 Stanley, G.M. and R.S.H. Mah (198 la), Observability and redundancy in process data estimation, Chem. Eng. Sci. 36, 259-272 Stanley, G.M. and R.S.H. Mah (1981b), Observability and redundancy classification in process networks (theorems and algorithms), Chem. Eng. Sci. 36, 1941-1954 Veverka, V. (1992), A method of reconciliation of measured data with nonlinear constraints, Appl. Math. and Computation 49, 141-176
This Page Intentionally Left Blank
297
Chapter 9 BALANCING BASED ON MEASURED DATA - RECONCILIATION I LINEAR RECONCILIATION
Among the mathematical models of industrial chemical processes, the system of balance equations is basic. If some measured data do not satisfy the balance equations, this fact is attributed to measurement errors, and not perhaps to an inadequate description of the process by the model. In practice, measurement errors are always present. Hence before using the measured data, they are adjusted to obey the balance constraints. The adjustment by methods using statistical theory of errors is called reconciliation. The measurement error is regarded as a random variable; the characteristics of a random variable are briefly summarized in Appendix E. Well-developed is the theory in the case when the constraints are linear. Let us thus begin with linear reconciliation. The reader will also need the results of Appendix B.
9.1
PROBLEM STATEMENT
Let us begin with a simple example.
4 5
+
I
S
,,.-I
i +
D I8,
Fig. 9-1. Example
The system consists of four technological units (A,B,C,D) and splitter S. Stream 2 from node A is split in S into stream 4 and bypass 3; node B is a heat exchanger. Measured are the mass flowrates marked as +, thus m~, + m6, + and m + 7 are the measured values.
298
Material and Energy Balancing in the Process Industries
The system of mass balance equations reads A:
m~
-
S"
m 2
= 0
m 2 -
m 3 -
B" C:
m 4
= 0
m 4 - m 5
= 0
m 3
m5
+
D"
-
m 6 m 6 - m 7 -
(9.1.1)
= 0
m8 - 0 .
The vectors of unmeasured resp. measured variables are m2 m 1
m 3
y
resp. x
m4
=
m 6
m 7
m5 m8
(9.1.2)
.,
By the methods of Chapter 3 (graph analysis) or Chapter 7 (classical elimination) we find the equivalent set of equations by summation over A, S, B, C m1 -
m 6 =
(9.1.3)
0
having thus eliminated the unmeasured variables, and m2
-- m l m 8
-- m 6 m 3 +
m 4
=
m 1
m 4 - m 5
=
0
-
m 7
(9.1.4)
while Eq.(9.1.1):C follows from (9.1.3 and 4). Given values of ml, m6, m7 the system (9.1.3 and 4) is solvable if and only if ml and m 6 obey Eq.(9.1.3). If so, then clearly m2 and m s are observable (uniquely determined), while m3, m4, m5 are unobservable; they are only subject to the conditions m4 = m5 and m 3 + m 4 = m~. The value of my is arbitrary (not subject to any condition); m 7 is a nonredundant variable. The remaining two measured variables (m~ and m 6 ) a r e redundant: given one of them, the other is determined by the condition (9.1.3). Recall Chapter 7.
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
299
Due to measurement errors, the actually measured values (components of x § most likely will not satisfy the condition (9.1.3). We thus have to find some a d j u s t m e n t s v~ and v6 such that, setting m^ 1 -
m §1 + V 1
/'~/6-
m~ +
}
(9.1.5)
126
we have (9.1.6)
/'~/1 - /T/6 = 0 .
The adjusted values thus have to lie on the straight line, say s
m6 = m6
N\
,,•p/ml *4ml+'m6+) T
mI
Fig. 9-2. Solvability condition for adjusted values
while (m~, m +6) T ~ L . The actual mass flowrates m 1 and m 6 are unknown; we can only try to e s t i m a t e their values as the adjusted ones. Intuitively, one would expect that the actual value of vector x would lie in the nearest possible neighbourhood of the vector x + of measured values. If we have no information on the possible measurement errors, we thus draw a line perpendicular to L in Fig. 9-2 and passing through the measured point; the intersection will be the estimated ( ~ , /~6 )T whose distance from (m~ , m +6 )T is smallest. We have thus resolved the problem (9.1.6) with the condition (rhl - m +)2 l
+ (/~6 _
m6+)2
= minimum.
In addition we put/'Y/7 -" m~ (unadjusted) because then also the distance between x § and the estimated :~ is minimum in the threedimensional space; the set (say) eft + of vectors x obeying the solvability condition (9.1.3) is a plane in l~3 passing through L (Fig. 9-2) and perpendicular to the (m 1 , m 6 ) plane.
300
Material and Energy Balancing in the Process Industries
Suppose we know the standard deviations of the random errors in measuring the mass flowrates, say Gi for the i-th measured flowrate; we suppose in addition that the errors are uncorrelated and of zero means. Then the greater is oi, the greater is the error that can be expected. It is thus natural to 'normalize' (re-scale) the adjustments as v~/o~: the greater is cyi the greater adjustment is admitted. Our problem thus reads: Find rh~ and/~6 obeying Eq.(9.1.6) and such that ^
m
+
-m 1
+ 2 /'Y/6 _- _m6 )
2 +
- minimum.
(9.1.7)
cJ 1
We can also imagine different scales for m~ and m 6 in Fig. 9-2. With the normalized scales , the straight line passing through (mT , m6+ )T is again perpendicular to L and the distance is again smallest. It is also smallest between x + and :~ ~ M + when setting in addition/~7 -- m7. Hence formally, the minimum condition can be written + 2 rrti _- m i )
Z
~
- minimum
(9.1.7 a)
i=1,6,7
along with (9.1.6), thus with the condition :~ ~ M + for :~ = (rh 1 , /'~/6, /~7 )T. Let us now have a general set of linear equations (constraints) (7.1.1), with the regularity condition (7.1.4), and with the partition of variables (7.1.9) into measured (x ~ R 1) and unmeasured (y ~ ]RJ ). We thus also know the set 91/[+ (7.3.4) of vectors x obeying the condition of solvability; see (7.3.2). Let x + be the vector of actually measured values. Suppose we know the covariance matrix F of measurement errors; it is an I x I symmetric positive definite matrix. If the matrix is diagonal (errors uncorrelated) thus F - diag(o 2, ..., cyi2 )
(9.1.8)
and if (we can suppose that) the errors are of zero mean then the reconciliation problem can be formulated, as a generalisation of (9.1.7a) with (9.1.6) :~ e M +
(9.1.9a)
where ^
I
+
Xi - X i
Z
i=I
Gi
2
= minimum
(9.1.9b)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
301
Xi b e i n g the i-th c o m p o n e n t o f x. T h e c o n d i t i o n (9.1.9b) thus reads (~ - X+ )TF-I(~:- X+) = m i n i m u m .
(9.1.9c)
More generally, let us admit that F is not diagonal thus some errors are correlated. Recall Appendix E, Remark (ii) to Section E.2. In the 'proper' coordinates of vector ~-x § (with some fictive 'de-correlated' random errors), the matrix F is diagonal and the minimum (9.1.9c) is again that of a sum of squares; thus again, a 'normalized' distance between x § and M § is minimized. The problem formulated as (9.1.9a) and (9.1.9c) is thus generalized for arbitrary distribution of measurement errors with known covariance matrix and zero mean of the error vector. T h e a p p r o a c h to r e c o n c i l i a t i o n m o t i v a t e d in the a b o v e m a n n e r a p p e a r s as p r a g m a t i c . It w o r k s w h a t e v e r be the distribution o f m e a s u r e m e n t errors, a n d in any case, it p r o v i d e s (as will be s h o w n in the n e x t section) some e s t i m a t e
obeying the solvability condition; it can be r e g a r d e d as the best estimate w e can do w i t h o u r limited i n f o r m a t i o n . F r o m the s t a n d p o i n t o f statistical t h e o r y the m o t i v a t i o n is, h o w e v e r , naive. M o r e r i g o r o u s is the f o l l o w i n g c o n s i d e r a t i o n . T h e actual v a l u e o f x ~ M + is u n k n o w n , thus the error vector e = x +- x
(9.1.10)
is also u n k n o w n ; w e only k n o w that x=x
§
M §
(9.1.11)
L e t f x be the j o i n t p r o b a b i l i t y density for the r a n d o m (vector) v a r i a b l e X o f m e a s u r e m e n t errors. O u r a i m is to c o m p e n s a t e the error by s o m e a d j u s t m e n t v = ~, - x +. Ideally, w e s h o u l d h a v e v = -e; but b e c a u s e e is u n k n o w n , w e e s t i m a t e e in the m a n n e r that fx(e) = m a x i m u m for x § - e ~ M § thus as the ' m o s t likely' error, g i v e n the c o n d i t i o n x = x + - e ~ M +. T h e n ~, = x + + v - x + - e will be our estimate. W i t h o u t g o i n g into details o f the statistical (probabilistic) t h e o r y o f estimates, w e thus p l a u s i b l y a d o p t the
m a x i m u m likelihood principle f o r m u l a t e d as the r e q u i r e m e n t fx ( x+ - :~) = m a x i m u m for ~ ~ M + w h e r e ~ is ( r e g a r d e d as) the best estimate.
(9.1.12)
302
Material and Energy Balancing in the Process Industries
The case that the function fx is precisely known is rare in industrial practice. The standard hypothesis is that the distribution of measurement errors is normal (Gaussian), with zero mean. But then, according to (E.2.5-9) where a = x - 0 and Fx = F ( 1 )T fx(X +- :~) = k exp - 2 ( i - x+
F-I(IK
-
(9.1.13)
x+)
is m a x i m u m (on an arbitrary subset of ~ ~ R ~ ) if and only if the (minus) exponent is m i n i m u m (on the subset). Hence the condition (9.1.12) reads again ( i _ X+ )T F-1 (I~ - X+ ) = m i n i m u m for ~ a 914+ .
(9.1.14)
W e thus have again the problem (9.1.9a and c), where ~, is the sought estimate and v = :~ - x + the adjustment.
Remark Consider in particular the uniform distribution (E.2.2). Then, clearly, if taking arbitrary ~, such that x § - ~, ~ ,c/'N we'll have fx ( x+ - ~') equal to the m a x i m u m (constant) value (E.2.2a) where N = I. The m a x i m u m likelihood principle then leads to an infinity of solutions, at least so long as the intersection of M § with the set of points ~ = x +- x' (x' ~ ,c/N ) is nonempty; the latter set is that of points z~ such that a i _ x +i - "~i <_ bi thus x +i - b i _< Xi _< x +i - a i (i = 1 , .-- , /). Thus assuming b i = - a i > 0, with Fig. 9-2 we have
m6
m6
L
m!
ml
a
b
Fig. 9-3. Maximum likelihood condition for adjustments with uniform distribution of errors
Chapter 9
-
303
B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
According to Fig. 9-3a, if x § is 'too far' from M § then it admits of no adjustment; but if closer to M § there is an infinity of solutions to the adjustment problem according to Fig. 9-3b. On the other hand the naive condition (9.1.9) allows one always to find some 'best' adjustment. Thus assuming again ai+bi = 0 thus E(X) = 0 by (E.2.3), using (E.2.4) we can find the estimate ~,.
9.2
RECONCILIATION FORMULAE As
motivated
in the preceding section, in practice reconciliation problem can be formulated as follows. In the linear model Cz + c = 0
the
linear
(9.2.1)
with M x N matrix C where rankC = M
(9.2.1 a)
is full row rank, and with M-vector c, the state vector z is partitioned into unmeasured vector y and measured vector x, thus Y /
z=
x
J
andC=
} I=N-J
(B,A)
}M
(9.2.2)
~~ J I
is the corresponding partition of matrix C. Let us designate M+: the set of x ~ ~i such that
By + Ax + c = 0 for some y ~ R J
(9.2.3)
thus such x that Eq.(9.2.1) with (9.2.2) is (not necessarily uniquely) solvable in y. Let further the model o f measurement read X+ =
X t -1- e
(9.2.4)
x t is the true (unknown) value of the measured vector, x § the actually measured value, and e random/-vector of measurement errors; for the sake of simplicity, we are using the same symbol for the random variable and its (arbitrary) realisation. Then e is assumed to be of zero mean thus where
E(e) = 0
(9.2.4a)
Material and Energy Balancing in the Process Industries
304
and with positive definite I x I covariance matrix F = E(ee T ) .
(9.2.4b)
The covariance matrix of errors is assumed constant, thus independent of the value x t. We suppose that the matrix is known a priori, for the given method(s) of measurement and instrumentation. Then the problem reads: Find ~ ~ R ~ such that ~, e M §
(9.2.5a)
and (~, _ X+ )T F-I(~, _ X+) = minimum ;
(9.2.5b)
thus the minimum (9.2.5b) is sought on the set M +. We shall first show that this f~ exists and is unique (given x + ); it is called the estimate of the true value x t. The difference v = ~, - x +
(9.2.6)
is called the adjustment of the measured value x +. The existence and uniqueness of the solution ~ can be proved as follows. According to (7.3.2), x ~ M + if and only if A ' x + c' = 0
(9.2.7)
where c' is an H-vector and A' an H x I matrix obtained by matrix projection (7.1.16), in particular by elimination (7.2.2), with H = M- L
where L = rankB
(9.2.7a)
and rankA' = H
(9.2.7b)
thus A' is of full row rank; see (7.2.6). Recall that the transformation (7.1.14) reads, according to (7.2.2)
) 'A" A,oc, c" J
I
1
, LtHM
(9.2.7c)
Chapter
9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
305
Let us designate R = F -1 .
(9.2.8)
Let us now assume that some :~ ~ M + obeys the m i n i m u m condition (9.2.5b). Having any other ~' ~ M + we can introduce the straight line tp(t) such that tp(0) = ~,, tp(1) = ~' (~ ~,) thus (9.2.9)
qa(t) = :~ + tw where w = :~' - ~, (;~ 0)
and where A ' w = 0 thus tp(t) e M + for any t. Denoting by ~ the scalar function
"~/(0 = (q)(0 -x+ )T R(q)(t)_x + )
(9.2.10)
we have (first derivative) (9.2.11)
~ ' ( t ) = 2(tp(t)-x + )T Rip'(t) where tp'(t) = w is constant, thus (second derivative)
(9.2.12)
xC"(t) = 2w T R w > 0
because w ~ 0 and R is symmetric positive definite. By the property of m i n i m u m at t = 0 where q~(0) = i we have ~ ' ( 0 ) = 0 hence the necessary condition reads
(~ _ X+ )T R w = 0 for any w ~ KerA' ;
(9.2.13)
indeed, any w ~ KerA' obeys A ' w - 0 thus any vector ~' = ~ + w obeys A ' ~ ' + e' = 0 thus ~' ~ M +. But then, as ~"(t) > 0 we have ~t'(t) > 0 for any t > 0 (and ~ ' ( t ) < 0 for any t < 0), hence ~(t) > ~(0) for any t ~ 0 hence, ~:' ~ M + having been arbitrary
(~,
_ X + )T R ( ~ '
- x § ) > (~-
x § )T R ( ~ -
x+)
(9.2.14) for a n y ~ ' ~ M + a n d ~ ' ~ z ~
.
H e n c e if some ~ e M + obeys the minimum condition, it is unique. Let now some ~, ~ M + obey the condition (9.2.13). Then, if ~' ~ M + is arbitrary, putting w = ~' - ~, and introducing again tp(t) and ~(t) as above, by ~ ' ( 0 ) = 0 and ~"(t) > 0 for t ~ 0 we find that the inequality (9.2.14) holds true; hence the condition (9.2.13) is also sufficient. W e have, so far, found the necessary and sufficient condition (9.2.13) for ~ M § to obey the condition (9.2.5b). Let us now set
306
Material and Energy Balancing in the Process Industries
= x+ + v
(9.2.15a)
where v = - FA 'T (A'FA
'T)-I
(A,x § + c')
(9.2.15b)
.
Then A'~,+c'=A'x
§
§
thus :~ ~ 914+, and if w ~ KerA' is arbitrary then VT R w
= - (A'x § +
c') T (A'FA
'T )-~ A ' F R w = 0
because F R is unit matrix by (9.2.8) and A ' w = 0 as w ~ KerA'. Thus ~ obeys also the condition (9.2.13) and as shown above, is unique. The proof is complete. The unique solution of the reconciliation problem can thus be found according to (9.2.15). Recall that A' being of full row rank, the inverse in (9.2.15b) exists. Other formulae giving this ~ can be found. So as to prove their validity, let us reformulate the necessary and sufficient conditions. The general form of the condition (9.2.7) is x ~ M +, with (9.2.3); the condition (9.2.7) is equivalent, whatever be A' resulting from the matrix projection (or elimination). Now for the condition (9.2.13). Observe that putting c = 0 in (7.2.1) we have also e" = 0 and e' = 0 in (7.2.2) and (9.2.7c). Thus in particular the equations
B"u + A " w - 0
}
A'w = 0
(9.2.16)
are equivalent to the equation
Bu + Aw = 0.
(9.2.16a)
Because B" is of full row rank L (7.2.4), if A ' w = 0 then there exists some u ~ R J such that both the equations (9.2.16) are satisfied, thus also Eq.(9.2.16a). Conversely if such u exists in (9.2.16a) then necessarily A ' w = 0 as the solvability condition. Hence w ~ KerA' if and only if Bu + Aw = 0 for some u ~ R J . We thus can reformulate the result, using the condition (9.2.13).
(9.2.17)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
307
The solution f~ of the reconciliation problem (9.2.5) with (9.2.1)-(9.2.4) exists and is unique. It is determined by the conditions :~ = x + + v ~ M +
(9.2.18)
with (9.2.3), and v x F-~w = 0
for any w ~ ~i such that
Bu+Aw-0
for s o m e u ~
(9.2.19) RJ .
The merit of the formula (9.2.15) consists in that it applies to any model (9.2.1) with any partition (9.2.2); we can have rankB = L < M, in which case some unmeasured variables are unobservable thus not uniquely determined by the reconciled ~. W e shall now give other formulae restricted, however, to the assumption (L =) rankB = J
(9.2.20)
(full column rank of B), thus to the case where, according to Chapter 7, the whole vector y of unmeasured variables is observable, thus determined by ~. Finding the solution of the problem (9.2.5) with (9.2.3) can also be regarded as a problem of reconciliation with unknown parameters (our vector y). With this interpretation and anticipating an extension to nonlinear problems, Knepper and Gorman (1980) proposed an iteration technique; see the next chapter. In the linear case, with the assumption (9.2.20), iteration is not necessary. Using the theoretical results of Kub~i~,ek (1969 and 1976), the solution can be found in one step. It will be rewritten according to Madron (1992). Let us introduce the (M+J) x (M+J) symmetric matrix AFA.r B ]
Z
BT
0
.
(9.2.21)
Let k ]
} M
Y
} J
(9.2.22)
t=
thus Zt = (
AFATkBTk + By
]
308
Material and Energy Balancing in the Process Industries
thus Zt = 0 implies BVk = 0 thus kTB = 0, and AFATk + By = 0 thus k TAFATk = 0 thus A Vk = 0, F being positive definite, thus finally By = 0 thus y = 0 by (9.2.20). Then, however Tk ] (B,
A) w k =
= 0
ATk
hence also k = 0, as (B, A) T is of full column rank; thus t = 0 if Zt = 0. Consequently Z is invertible. Observe that the condition (9.2.20) is necessary, else By = 0 for some y ~: 0 thus Zt = 0 for some t r 0 by (9.2.2) with k = 0.
Let us partition
Z -1
_
Q1,
Q12 )
} M (Qzl = QlV2 )
Q21 Q22
M
(9.2.23)
} J
J
and put k = - Q l l ( Ax+ + c)
= -Q21 ( Ax+ + c)
(9.2.24)
v - - F A T Qll (Ax+ + c) ~:=X+ + V .
W e then have
(,)--z-1(o) k
Ax++c
thus AFATk+B~'+Ax
§
BTk
=0 =0
hence, as v - F A T k B~' + A ( x § + v) + c - 0
thus x + + v e M +, and whatever be w such that B u + A w = 0 for some u we have
Chapter 9 VT F l w
- B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
= k T AFF-lw
= k T Aw
309
= -k r Bu = 0
because BVk = 0 thus also kVB = 0. Hence ~ = x + + v is the unique solution of the reconciliation problem (adjusted measured vector), and in addition ~ is the unique (observable) vector y of unmeasured values determined by f~. The procedure (9.2.21), (9.2.23 and 24) requires only matrix inversion, without any elimination. The auxiliary vector k (called vector of Lagrange multipliers, due to the original derivation of the formula) can be eliminated. The solution (9.2.24) can be written in compact form V
(
AIj
0)/AFAT")I(Ax++c/0 .T 0 0
and
(9.2.24a)
~:=X++V
where Ij is unit J x J matrix. Observe that if rankB = L < J then By = 0 for some y r 0 and the equation Zt = 0 with (9.2.21 and 22) admits, as shown above, of a nonnull solution; thus Z is not invertible. Consequently, assuming of course again rankC = M in (9.2.2), Z is regular if and only if rankB = J
(9.2.25)
where Z is the matrix (9.2.21). The matrix Z is (M+J) x (M+J). Another formula, requiring inversion of smaller matrices (M x M and J x J), reads as follows. We introduce an arbitrary positive definite matrix Fy ( f o r example unit matrix Ij), denote F as Fx, and
Fz = Fx
/
(9.2.26) 9
Then the M x M matrix U = CFz C T= B F y B T + AFx A T
(9.2.27)
is also positive definite, C being of full row rank. Assuming again rankB = J, B v is of full row rank and the J x J matrix Y = B T U -1 B
(9.2.28)
is also positive definite. Let further W : U -1 ( U -
B Y -I n T )
( V -1 W T = W U - 1) .
(9.2.29)
310
Material and Energy Balancing in the Process Industries
Then ~r - _y-1 B T U-1 s +
v = -Fx A T W U
-is+
(9.2.30)
where s § = Ax + + c;
here, .~ is again the unique value of y determined by the estimate (9.2.30a)
~-x++v. W e have
(9.2.31)
BTW=0 by (9.2.29 and 28). Then, by (9.2.27) A i + c = s + - AFx AT W U l s + = s + - U W U l s + and with (9.2.29) B~' = - B Y 1 B T U l s + = ( U W - U ) U l s + = U W U l s + - s + hence B:~+Ai+c=0 thus ~ ~ 914+, with the uniquely determined S'. Let now w ~ 1~~ obey B u + A w = 0 for some u, hence Aw
= -Bu.
Then v T Fx-lW = _(U-is+ )T W T A w = ( U - i s + )T W T B u = 0
as W T B = 0 by (9.2.31). Hence the conditions (9.2.18 and 19) are satisfied and (9.2.30 with 30a) is the unique solution.
Remarks
(i)
From (9.2.15b) follows immediately that replacing matrix F with an arbitrary kF where k > 0, we have kk -1 =1 hence v thus ~ remains unaltered. The value of the criterion (9.2.5b) will be, however, inversely proportional to k.
Chapter 9 (ii)
-
311
Balancing Based on Measured Data - Reconciliation I
Clearly, if H = 0 (9.2.7a) then the condition (9.2.7) is absent, we have M + = R I and the minimum (9.2.5b) is attained with ~, = x§ no adjustment. If then L = rankB = J this means that M = J, thus B is J x J regular and ~ is uniquely determined by :~ = x § On the other hand, if it happens that H = I then A' in (9.2.7) is I x I regular, thus in such case vector x is uniquely determined by the constraints and need not be measured. Finally, if J = 0 (all variables measured), we can set A' = A and c' = c in (9.2.15b) because no elimination is necessary due to the assumption (9.2.1a) where C = A. Summarizing the special cases H = 0: v = 0
(9.2.32)
[H = I: ~ = - A ' - l c ']
(9.2.33)
J=0:
(9.2.34)
v = - F A T(AFA T)-I(Ax + + c ) ;
the case when H = I means, however, that the whole vector x is a constant of the model and not variable. (iii)
Recall the classification of variables by Chapter 7. Let some measured variables, say subvector x 0 be nonredundant; thus having re-ordered the variables we have
x* ) }I-Io
x =
Xo
and
A'= (A*, 0)
(9.2.35a)
} Io the covariance
according to (7.2.7). Let us partition corresponds to the above partition
matrix
as
F* F' / F =
F 'T Fo
.
(9.2.35b)
Then, with the corresponding partition of x § in (9.2.15b) we have (9.2.36a)
A ' x § + c' = A*x *+ + c';
consequently, the adjustment v is independent of the measured subvector X+ 0 9 Further A ' F A 'T = A* F* A *T thus
V =
( -
F* A*T F' T A, T
/
(A*
F* A *T)-1 (A*x *§ +
,
c) =
(v,) Vo
(9.2.36b)
312
Material and Energy Balancing in the Process Industries
is partitioned into the corresponding adjustments v* of x *+ and v0 of x0+.
If the components of the error vector are uncorrelated then F' = 0 thus v 0 = 0: the nonredundant variable is then nonadjustable. If, however, F' ~ 0 then generally v 0 ~ 0: for example if H = 1, A' = (1,0), c' = 0, and
11,2 / 1/2 1
9
(F is positive definite, as the reader readily verifies), we have v - (v*, v0 )~ where 9
v =-x
*+
andv 0=-
1 2
x
*+
the nonredundant variable thus shares a portion of the adjustment with the redundant one, being correlated, although its measured value itself does not affect the adjustment. This (seemingly paradoxical) result is a consequence of the minimum condition (9.1.14), for a Gaussian error vector thus of the maximum likelihood principle. (iv)
The reconciliation formula (9.2.30) can be obtained formally as a limit for the case when all the variables are measured, but the (arbitrary) covariance submatrix Fy is replaced by Fy + klj where k ---> +0% thus when all the y-error variances tend to infinity; then there remains only x + to be reconciled. The idea is due to Romagnoli and Stephanopoulos (1981). Let us stress once more that the result is independent of the choice o f Fy.
9.3
STATISTICAL CHARACTERISTICS OF THE SOLUTIONS; P R O P A G A T I O N OF E R R O R S Let us start from the expression (9.2.15b) for the adjustment v. Designate
r' = A ' x § + c' ;
(9.3.1)
it is the residual of the equation (9.2.7) with x = x § Thus v = -FA '+ ( A ' F A '+ )-~ r ' . According to (9.2.4) where A ' x t + c' = 0
(9.3.2) Xt
obeys, by hypothesis (9.3.3)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
313
we have r' = A ' e
(9.3.4)
with (unknown) random error vector e. Thus also r' is a random variable and because A' is of full row rank H, it has a probability density; see Appendix E. According to (E.1.22 and 23), we have E(r') = 0
(9.3.5)
by hypothesis (9.2.4a), and (say) F c = E ( r ' r 'T) = A ' F A '+
(9.3.6)
according to (9.2.4b). Fc is positive definite. If the error vector is Gaussian then also the residual vector r' is Gaussian. We assume of course H > 0 (else v = 0 according to Remark (ii) to Section 9.2). On the other hand, we can assume H < I; see (9.2.33). But then rankA 'T = H < I hence A 'T is not of full row rank and the random variable v does not have a probability density as introduced in Appendix E. The covariance matrix of random variable v is thus (positive semidefinite but) singular (not regular). If e is Gaussian, the adjustment vector v has a 'degenerate' Gaussian distribution; we shall not examine its properties. We have anyway the mean E(v) = 0
(9.3.7)
and the covariance matrix F v = FA 'T F~!A'F
(9.3.8)
according to (9.3.6). Also the random variable ]K-Xt, thus the error committed by the estimate ~, is of zero mean, but does not have a probability density. See Remark (iii) at the end of this section. Let us now consider the value (9.2.5b) at ~-x + = v where the minimum is attained. Denoting Omin = vT F-iv
(9.3.9)
where v is the adjustment (9.3.2), we have again a random variable. We have Omin = r'T F~!r'
(9.3.10)
with (9.3.5 and 6). If in particular e is Gaussian then r' is Gaussian and according to Appendix E, Section E.2, Qmin has the chi-square distribution with
314
Material and Energy Balancing in the Process Industries
H degrees of freedom, as r ' is an H - v e c t o r r a n d o m variable. O b s e r v e that whatever be the distribution of r a n d o m variable e (thus of r ' ) , w e h a v e the m e a n E(Qm~n ) = H .
(9.3.11) m
Indeed, let X be an arbitrary random variable (M-vector), E(X) = x, with covariance matrix F x . Then, for any x 1 (X-X) T F x 1 (X-X) = yT d i a g
-al
,
,.~
y
aM
~
u
i=1 a i
where y = QT (x-x) with orthogonal matrix Q diagonalizing F x QT Fx Q = diag(at,
(9.3.12)
, aM )
with eigenvalues a~, ..., aM (> 0). Thus M 1 (say) E(Q) = E((X-~)TFx ~(X-~)) = Z - - E(yi2 )
(9.3.13)
i=1 a i
where E(yyr ) = Qr Fx Q thus in particular E ( y 2 ) -- a i
by (9.3.12), thus the mean (9.3.13) equals M
ai
E(Q) = Z - - = M
(9.3.14)
i=1 a i
Setting x = r', x = 0, and H = M we have (9.3.11). L e t us further c o n s i d e r the solutions y of Eq.(9.2.3) w h e r e R = x § + v has b e e n adjusted so as to m a k e the equation solvable. A c c o r d i n g to Section 7, w e thus h a v e to solve Eq.(7.2.2)
B"y + A"~ +c" = 0 ;
(9.3.15)
recall the t r a n s f o r m a t i o n (9.2.7c). U s i n g the special f o r m (7.2.3) of m a t r i x B", if Lo > 0 then an L0-subvector of y, say Y0 is uniquely d e t e r m i n e d (observable); if A~ resp. c~ is the c o r r e s p o n d i n g L o x I submatrix o f A " resp. L0-subvector of c", w e h a v e Yo = $% w h e r e
Chapter
9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I tt
A
tt
Yo = -(Ao ~' + Co ) 9
315
(9.3.16)
Let y~ be the (hypothetical) true value of Yo; it then obeys the same equation with x t in lieu of ~,. Subtracting Yo- Y~ = -Ao (e + v)
(9.3.17)
because ~ -/tl t = ]K - X+ 4" X+ - Xt = V "1- e by (9.2.4). Hence Yo-Y~ is a random variable (Lo-vector), E(.~o-y~ ) - 0
(9.3.18)
by hypothesis (9.2.4a), and the covariance matrix F~o = E((Yo-Y~ )(Yo-Y~ )T )
(9.3.19)
equals F ~ o - A~ E((e + v)(e + v) T )AoT . Here, e + v = Pe
(9.3.20)
where P = I - FA 'T ( A ' F A 'x )-~ A' (I ... unit I x I matrix)
(9.3.21)
according to (9'3.2 and 4). Consequently Fyo = (A~ P)F(Ag p)T.
(9.3.22)
Generally, the covariance matrix Fyo need not be positive definite and the random variable Yo need not have a probability density, unless, according to Appendix E, the matrix Ag P is of f u l l row rank L o . It can be shown that this necessary and sufficient condition is equivalent to the condition
(A~/
rank A'
= H + Lo
(full row rank).
(9.3.23)
316
Material and Energy Balancing in the Process Industries
Proof'. Let x e KerA'; then Px = x thus KerA' c ImP. Let x e ImP; then, for some y x = y - F A 'r ( A ' F A 'r
)-1 A ' y
thus A'x = A'y - A'y = 0 hence x ~ KerA', thus I m P c KerA'. Consequently
(9.3.24)
I m P = KerA' .
According to Appendix B:(B.10.31), there exists a regular (orthogonal) I x I matrix Q such that
A'Q = ( A §
H I-H where A § is H x H regular. We then can partition
AoQ=(M,N)
}Lo
H I-H thus
/A~ Ao
/MN/
Q=D=
A§
0
.
(9.3.25)
Let us partition
Olx /
Yo
}
I-H.
Thus x ~ KerA' (= ImP) if and only if
A ' x = 0 thus (A § 0)
= A+y+ = 0 Yo
thus if and only if 3,+ = 0, thus if and only if
Q-ix -
(~
with arbitrary Yo e RIH.
Yo Then
Aox = A o Q Q l x = (M, N)
/~
= Ny o .
Yo Consequently, by (9.3.24), A; P is of full row rank if and only if the vectors Ny o
Chapter 9 -
31~/
Balancing Based on Measured Data - Reconciliation I
(Yo ~ RVl~) generate the whole R Lo, which means rankN = L0. (i)
This condition implies
rankD = rank
/ MN )
= H + Lo
A+ 0 because rankA+ = H. Let conversely rankD = H + L 0 . Then, by successive regular transformations
(ii)
/MN/ /MN / _ A§ 0
IH 0
IH 0
} H
with unit matrix Is eliminating the elements of M; thus rankN = L0. Consequently, rankN regular, we have
= Lo if and only if rankD
rank(A~'P)=Loifand~
= H + L o . But because Q in (9.3.25) is
I =~H + L o A ,
which is (9.3.23).
Let in particular L = rankB = J (thus L o = L), thus let the whole vector y of unmeasured values be observable, thus determined by ~ as ~. Then Ag = A" in (9.3.23), H + L o = H + L = M, and the matrix (9.3.23) is transformed matrix A (9.2.2), according to (9.2.7c). Thus the necessary and sufficient condition for rank(A"P) = J (= L) reads rankA = M
(9.3.26)
(full row rank). Then the random variable ~_yt has a probability density, and if the error vector e is Gaussian then the distribution of the variable is also Gaussian, and the random variable Qy = (~_yt)T F~I ( y _ y t )
(9.3.27)
has the chi-square distribution with J degrees of freedom. Here,
F~ = (A P)F(A P) T tt
t!
(9.2.28)
318
Material and Energy Balancing in the Process Industries
with (9.3.21)and (9.2.7c) where B"=
(9.3.28a)
Ij
is unit J x J matrix, thus where Gauss-Jordan elimination has been applied to matrix B. The expression (9.3.28) for Fy holds anyway; under the (necessary and sufficient) condition (9.3.26), Fy is positive definite. The matrix F~ can be computed using other formulae. In (9.2.24), subtracting again yt we have S' - yt = -Qxl Ae . Computing ZZ ~ = IM§J (unit matrix) according to (9.2.21 and 23), we obtain matrix equations for the submatrices in (9.2.23). They read AFAT Q l l + BQT2 = Ira BT QlJ
AFAT Q12 + BQ22 = 0
= 0
BT Q n
= Ij (thus QT2 B = I j ) .
Hence F~ = Q21 AFAT Q12 = -QT2 BQ22 = -Ij Q22 " thus
F~
=
(9.3.29)
-Q22
where Q22 is the J • J submatrix in (9.2.23). Using the formulae (9.2.30) we obtain ~, _ yt = _y-i B T U - 1 A e
hence F~ = y-1B T U-1AF x A T U-1By-i where AF x A T = U - BFyB T (9.2.27) thus F~ = y-1B T U-1 By-1 _ y-1B T U-1BFy B T U 1 BY "1 with (9.2.28)" consequently
F~ = y-i
_ Fy
(9.3.30)
where Fy is arbitrary (for instance unit) J x J matrix, and Y the J • J matrix (9.2.28) with (9.2.27).
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
319
Remarks
(i)
Consider in particular the system of mass balance equations (Chapter 3). Then the reduced incidence matrix C of graph G in (3.1.6) is partitioned C = ( B, A ) jo j+
(9.3.31)
according to (3.2.1), where J+ is the set of streams with measured flowrates ('measured streams'), j0 corresponds to the unmeasured ones. Hence A is reduced incidence matrix of the subgraph G § [N, J+] restricted to the measured streams. The condition (9.3.26) of full row rank is thus equivalent to the condition: G + [N, J§ ] is connected.
(9.3.32)
The condition of observability, thus rankB = J = I J~ requires that all the connected components G Oof subgraph G O[N, j0] are trees (possibly isolated nodes), as shown in Section 3.3. Under these two conditions, the covariance matrix Fy is positive definite. Consider for example Fig.3.6 in Section 3.2. The subgraph G O consists of isolated nodes and two (nontrivial) trees; hence y is observable. We have K = 5 for the number of connected components G O, thus K- 1 = 4 scalar equations (3.2.3) for reconciliation, and by the adjusted measured mass flowrates, the 4 unmeasured flowrates are uniquely determined; the covariance matrix F~ can also be computed. But the subgraph G § has two connected components (one of them containing stream J2 only), hence is not connected, hence F~ is not positive definite. (ii)
The means and covariance matrices of the computed variables characterize statistically the propagation o f errors in the (linear) system. Generally, if some (vector) variable x is measured and some other y is a (deterministic) function of x, committing an error in x this error is propagated among the components of y. In the present case, with measured x = x § the unmeasured y is determined only if x obeys the solvability condition; we thus can examine the (observable) components of y only as functions of the adjusted (reconciled) values ~. Let generally some vector u be determined as function of the state variable z (9.2.2) obeying Eq.(9.2.1). Having measured only x, the value of u can be computed only if y is observable, in which case we obtain first ~ by reconciliation, then ~ as an estimate
320
Material and Energy Balancing in the Process Industries
$, = M~ + d
(9.3.33)
with J x I matrix M and J-vector d. Thus by (9.3.16) where L o = L - J (the observable case), M = -A" and d - -c". Let u be linear in z, plus some constant, thus (say) (9.3.34)
u = D y + E x + Uo
with constant u o. If u depends only on (observable) subvector Y0 (or is independent of y), we replace y by Y0 (or set D = 0). The true (unknown) value of u obeys U t --
Dy t + Ex t + u o
(9.3.34a)
while using the estimates ~, and ~', we can estimate (9.3 34b)
fi = D~' + E ~ + U o .
Then the error in the fi-estimate fi- u t = D(.~-
yt) + E ( ~ - x t )
is a random variable. We have ~- x t
(9.3.35) = vq-e
andS'- yt = M(v+e) thus .
- u t = (DM + E)(v + e) .
.
(9.3.36)
B y hypothesis (9.2.4a) E(fi
- i1 t ) = 0 .
(9.3.37)
Further, for e+v we have (9.3.20). Hence the covariance matrix Fa - E ( ( f i - u t ) ( 1 1 -
U t )T) :
NFN T
(9.3.38)
where, with (9.3.21) (9.3.38a)
N = (DM + E)P
is V x I if u is a V-vector. We can now repeat, step by step, the proof of (9.3.23) where D M + E is substituted for A~. Consequently DM+
FQ is positive definite if and only if rank
A'
E
I
-H+V
(9.3.39)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
321
where A' is an (arbitrary) matrix obtained by matrix projection (7.1.16), for instance by the procedure according to Section 7.2, of full row rank H. Then, if the error vector e is Gaussian the random variable fi- u t is also Gaussian, and the variable QQ = (fi_ Ut )T F~u1 (I]- Ut )
(9.3.40)
has the chi-square distribution with V degrees of freedom. When the equations are nonlinear, the propagation of errors is a delicate problem of statistical theory that will not be discussed here. In practice, some information can be obtained from linearized equations; cf. Section 10.3 below. (iii)
Let us return to the matrix (operator) P (9.3.21). According to (9.3.24), its rank equals the dimension of the null space KerA', thus I-H because rankA' - H. Hence, so long as H > 0 (else v = 0 and no reconciliation takes place), the I • I matrix P is not of full rank. Because, by (9.3.20) -
X t --
V
"4- e
-
Pe
(9.3.41)
the random variable (error committed by the estimate ~) is of zero mean E(i-
x t) = 0
(9.3.42)
by (9.2.4a), while the covariance matrix F~ = E ( ( i - Xt ) ( X - Xt )T) _ pFpT
(9.3.43)
is positive semidefinite, but singular. The random variable :~- x t does not have a probability density as introduced in Appendix E. According to (9.3.41), its values occupy a lower-dimensional space, viz. KerA' by (9.3.24). Observe that the latter space, as well as the matrix P, are independent of the particular transformation of the original equation (9.2.1) with (9.2.2). Indeed, see (7.3.1); because, taking another matrix for A', the new matrix (A'~, say) obeys A'~ = ZA'
(9.3.44)
with regular Z[H, H], we have A'x - 0 if and only if A'~ x - 0 thus KerA' - KerA'~, and the new P (say, P1 ) equals P1 - I - FA 'T Z T ( Z A ' F A 'T Z T )-1 ZA'
= I - FA 'T Z T ( Z T )-1 (A,FA,T)-1 Z-1 ZA' =P
.
322
Material and Energy Balancing in the Process Industries
Recall that
(9.3.45)
Px = x for any x r KerA' = ImP by (9.3.24). Let us designate
(9.3.46)
p* = FA,T (A,FA,T)-1 A' = I - P thus P* is also independent of the transformation. We have P*P = 0 and PP* = 0, while P P = P and P'P* = P*
(9.3.47)
as is readily verified. Any x ~ R N equals x = Ix = Px + P*x
thus R N = ImP + ImP* where (IMP) n (IMP*) = {0}
(9.3.48)
because x = PY0 = P'Y* implies Px = PP*y* = 0 and P*x = P*PY0 = 0 thus x = 0. Consequently, according to Appendix B: (B.3.4), the spaces KerA' = ImP and ImP* are
supplementary. The matrices (operators) P and P* are projectors into KerA' = ImP and IMP*, respectively. The two subspaces have the property that if x 0 ~ KerA' and x* ~ ImP* then x~F-lx * = 0 because if x o = PYo and x* = P'y* then
(9.3.49)
y*Tp*T F-1PYo = y*TF-1 P*PYo = 0 .
The result can be interpreted as follows. If the covariance matrix F is diagonal then generally, for two/-vectors x 1 and x 2 of components x~i resp. x2i
T F - 1X2 = X Xl,
I Xli X2i
i=l
(5i2
is the canonical scalar product of'normalized' (re-scaled) vectors (Xli/(Yi) and (x2~/cYi); if it equals zero then the two latter vectors are orthogonal (perpendicular to one another in the classical threedimensional space if I = 3). [If F is general, one can imagine the two vectors expressed relative to their 'proper' coordinate axes; see the fine-printed note after formula (9.1.9c).] The decomposition (9.3.48) by the projectors P and P* is thus an orthogonal decomposition in the generalized sense (9.3.49), via the 'normalizing' matrix F -1. Now by (9.3.20), the adjustment vector v = (P-
I)e = -
P*e
(9.3.50)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
323
taken with opposite sign is, in this sense, the (minus) projection of the error vector e into the subspace orthogonal to KerA' = ImP. If I = 2, imagine
X2/0 2
+:A-x+c'=0 ^
/
/
9 X+
Fig. 9-4. Orthogonal projection of error vector
in the 'normalized' (re-scaled) coordinates. The reader can perhaps also imagine 914+ as a straight line or plane in 3-dimensional space. The portion ~,- x t = Pe tangent to the set 914+ remains unadjusted. We only know (assume, since by hypothesis E(e) = 0) that its statistical mean equals zero, and that the covariance matrix is (9.3.43). (iv)
Let us apply the result (9.3.39) to two special cases. First, let u (9.3.34) be the i-th component of the measured vector x; hence D = 0, u 0 = 0, and E = ~i is the i-th unit row/-vector; for example 8~ = (1, 0, . . - , 0). k
Y
/
I The rank of matrix (9.3.39) is > H as rankA' = H. Let it equal H thus ~i is linear combination of the rows of A'. Then, given vector x obeying the solvability condition A'x =-c'
since ~i X "- Xi this xi is a linear combination of the components of (-c'), hence xi is a constant of the model and not variable. Precluding such case, the condition (9.3.39) is always obeyed for any i = 1, ... , N. Consequently, by (9.3.38) 0.2xi = E ( ( ~ i -Xi t)2 ) > 0 (i = 1, .-., N)
(9.3.51)
324
Material and Energy Balancing in the Process Industries
and if e is Gaussian, the variable (9.3.40)
0 .2
has the onedimensional )~2-distribution giving the probability P{lxi-x{I
< ao~,} for any a > 0
which, in this case, follows directly from the standard normal distribution (see the next remark). Let further u be the j-th component of unmeasured variable y; let yj be o b s e r v a b l e . Thus E = 0 and u0 = 0 in (9.3.34); while D = ~Sj where ~ij is the j-th unit row J-vector. Hence, with DM + E =-~Sj A" as remarked after formula (9.3.33), the matrix is the j-th row vector (say) -~j of matrix -A". The same consideration as above then shows that if
rank
= H (exceptional case)
then % is linear combination of the rows of A', thus yj = -t~jx - c]' (9.3.16) is constant whenever x obeys the solvability condition, thus yj is a constant of the model. Precluding again this case, the condition (9.3.39) is again satisfied and cyyj2 = E((~j- y} )2) > 0 (for yj observable)
(9.3.52)
If e is Gaussian then (~j- y} )2/(y?Yj has again the onedimensional )(;2-distribution and the probability P{[~j-y~ I < boyj} for any b > 0 follows from the standard normal distribution.
(v)
In practice, the distribution of errors is considered Gaussian. For a Gaussian scalar variable x, of zero mean and standard deviation CYx,the variable y = x/c~ x has the standard normal distribution, as is readily shown by substitution in the formula (E.2.5) for N = 1, thus
Chapter 9 -
B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
1
P{x
x2
a
=
~ exp
202
O'x (271;) 1/2 -oo
l
=
325
alox ~ exp (2rt) 1~2 _~
1 y2
--i
dx
(9.3.53)
dy;
we have (Yy "-- 1. The standard normal distribution is denoted as N(0, 1). Given number p > 0, the quantile Up of N(0,1) is the real number determined by the condition P{y < Up } = p
(9.3-.54)
thus
(271;) -1/2 ~ exp - -~- y
dy - p ;
(9.3.54a)
-OO
clearly, because the LHS is increasing function of Up, this Up is uniquely determined as function of p. The values of Up can be found in statistical tables. In practice, we require that the probability p be a number near unity, say p = 1 -o~ where for instance a = 0.05 (95% probability). We are then asking in what interval around zero the value of x will lie with this probability, thus what is the limit I xl will not exceed with probability 1- ~. As an easy exercise, the reader can check that this number is Ul_ot/2for the standard normal distribution, thus generally
P{ Ixl <
}
:
1
-
r
(9.3.55)
for the distribution (9.3.53). Observe that the onedimensional 22-distribution gives, for a given a > 0, just the probability p{y2 < a 2 } = p{ l yl < a} for any a > 0. Thus for instance with (9.3.51) we have the confidence interval obeying P{ ]-~i _ xit[ <~(Yxi Ul-a/2 } = I - c ~ .
(9.3.56)
Also the quantiles of the z2-distribution can be found in tables. They are denoted by ~2p(K) for K degrees of freedom. Thus, again with p - 1 - ~ , for the V-vector variable u (9.3.34), we have 2 P{ (o t- I1) T F~ 1 (o t- I1) < ~l_a(W) } - 1 - o~
(9.3.57)
326
Material and Energy Balancing in the Process Industries
the condition (9.3.39) is fulfilled, with (9.3.33) and (9.3.38). Given ~ (computed from the reconciled ~,), with probability 1 - a the true values I1t c o v e r the V-dimensional ellipsoid limited by the condition
provided
(Qa =) (ut- ~)'rF~l ( u t _ ~ )
< ~2_or
"
(9.3.57a)
The reader can get an idea if he sets V = 2. Taking for example 3/2
1/2 )
FQ ---
1/2 3/2 we have 3/4 -1/4 )
F~ul=
-1/4
3/4
and putting
ut-II= (y x /
(9.3.58a)
we have 3
-
3 xy + ---7 y2 ," 2 4
x = --7-2_ ( u - v ) , ~12
y = --;2_ ( u + v ) ~12
a.=
4
1
substituting
1
1
(9.3.58b)
we have Qu =
1
u2 + V2
2 where the substitution is orthogonal; it is a rotation x - u coso~ - v sin~ y = u sino~ + v cosc~ Thus the condition
where a = rff4.
C h a p t e r 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
327
Qo
,,2' v
/
/
/ "U
/ / / /
Fig. 9-5 Example of ellipsoid (9.3.57a)
where the values u t ellipse
1
//2 d- V 2 =
=
(ul, u2t ) T are inside of the region limited by the
a
2 with the substitutions (9.3.58a and b). If a = Z~-~(2) then the probability that with the estimate fi the true value u t lies in the marked region equals 1 -ct. With the same probability, [ul-fiil < (~fii/'/1-o,/2 (i - 1 and 2) where 2 oQ, = 3/2 (i = 1 and 2) are the diagonal elements of FQ. Generally, again by an orthogonal transformation, the region (9.3.57a) is transformed to a V-dimensional ellipsoid in its standard position with respect to orthonormal eigenvectors of matrix FQ, giving V
Z
i=1
2 Zi
-52 < Z~-~(V) where z = (zl, "'" , Zv )T = QT (Ut - 6)
(9.3.59)
a i
with eigenvalues ai2 of Fa" Q is the orthogonal transformation matrix. In the case above, 2 2 and a 2 = 1. a I -~
For a more detailed interpretation of the statistical characteristics and their use in practice, se Madron (1992). (vi)
The matrix P F P ~ occurring in (9.3.43), (9.3.22), and generally in (9.3.38), can be recast into another form introducing the symmetric
matrix
328
Material and Energy Balancing in the Process Industries Q = F-1 _ A,T (A,FA,T)-1 A '
(9.3.60)
thus Q _ F - 1 p _ pT F-1.
(93.60a)
We then have P F P ~ - P F Q F - PPF, and by (9.3.47)
PFP T = FQF
.
(9.3.61)
Denoting by ~i the i-th row vector of unit matrix (i-th unit row vector), for an arbitrary matrix M the i-th row is t~iM, and for a square matrix ~i MSy is its i-th diagonal element. Then in particular by (9.3.43), the i-th variance cy~2 (9.3.51) equals (y2 T Xi- q)i Q q)i
(9.3.62)
where cPi is the i-th row vector of F; thus q)i "- (Yi2~ i if F is diagonal with error variances (Yi2 as the diagonal elements. By (9.3.22), for any observable variable yj the j-th variance cy~j (9.3.52) equals G?yj- czj"FQFct~ v
(9.3.63)
where ct]' is the j-th row vector of matrix A" in the canonical format according to Section 7.2. (vii)
Because the adjusted vector :~ - x + + v thus the estimate error - x t = e + v by (9.2.6) and (9.2.4), with the assumption (9.2.4a) the formula (9.2.4b) implies F - E(ee T ) = E((~:_x t )(~_X t )T ) + E(vv T ) _ E((~:_x t )v T ) _ E(v(~_x t )T ) .
Hence with the notation (9.3.43) and (9.3.8), using (9.3.41) and (9.3.50) we have F - F~ + F v + E((Pe)(P*e) T ) + E((P*e)(Pe) T ) = F~ + F v + P F P *+ + ( P F P *+)v.
But by (9.3.46), F P *v - P*F and by (9.3.47), PP* - 0. Consequently
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
F = F~ + F v
329 (9.3.64)
where the RHS matrices are generally positive semidefinite. In particular for the diagonal elements we have 0.2 _ 2 02 ~ 2 xi (Yi - vi (Yi
(9.3.65)
is the standard deviation of the i-th measurement error, and Ova (> 0) the standard deviation of the i-th adjustment. Hence the where
(Yi
reconciliation cannot but decrease the standard deviations of the estimates, i.e. improve their precision. It will be shown in the next section (9.4.7) that at least with uncorrelated errors, we have even o 2v i > 0 unless the i-th variable is nonredundant (nonadjustable). Hence in the most frequent case, the reconciliation improves the precision of
redundant variables' estimates.
9.4
GROSS ERRORS
Statistically, a gross error is an error whose occurrence as realisation of a random variable is highly unlikely. It can arise out of inattention, a fault in the measuring instrument, erroneous calculation, or some other unforeseen event. The presence of a gross error corrupts also the results of other measurements and estimates, due to the propagation of errors in the reconciliation and unmeasured variables' estimation. A detailed analysis lies beyond the scope of the present book. Let us only summarize the theoretical possibilities for detection and identification of gross errors. See further for instance Madron (1992). The presence of a gross error can be (not necessarily) detected when computing the criterion (9.3.9) Qmin = vT F - i v
(9.4.1)
where F is the covariance matrix of measurement errors, and v the adjustment of the measured vector x +, thus :~ = x + + v
(9.4.2)
is the reconciled value of x, obeying the solvability condition (9.2.3), thus ~ M + (9.2.5a), and minimizing the criterion (9.2.5b). Assuming, as is common in practice, that the vector of random errors has a normal (Gaussian) distribution, the distribution of the random variable Qm~nis ~2 (/_/) where H is the degree of redundancy (9.2.7a); see (9.3.10). Given some ct (0 < ct < 1), with probability
330
Material and Energy Balancing in the Process Industries
ct the value of Qn~n will not exceed the quantile Z~-~(H); taking a critical value of ot (say, ct = 0.05 thus 1 -tx = 0.95) we have 1 -
Qmin > ~-a (H)
(9.4.3)
with probability oc Thus if ct = 0.05 then the event (9.4.3) occurs with probability 5 %. Regarding such event as unlikely, exceeding the critical value (9.4.3) signals the presence of a gross error. Observe that an error in measuring some nonredundant variable does not affect the value of the residual r' according to (9.2.36a); hence such (even gross) eror is not detected. [It can, however, still corrupt the estimate $, of the unmeasured variables.] Having detected the presence of a gross error, we further search for its source. The simplest method is computing standardized adjustments. According to (9.3.8), the i-th diagonal element of matrix F~, thus the variance of the i-th adjustment equals 0.2v,- ~ i F A , T F~,A -1 , F ~ Ti where ~5i is i-th unit row/-vector. In the sequel, we shall limit ourselves to the case when the covariance matrix F is diagonal. Then ~i F
= f i ~i
where f
= 0.i
(> o)
(9.4.4)
is the i-th diagonal element of F thus the variance of the i-th component e i of error vector e = (e, , . . - , e, ) T .
(9.4.5)
Let us write A' - (a'~, -.., a'~)
(9.4.6)
thus a'i is the i-th column vector of matrix A' (9.2.7). Consequently 0 .2Vi =
-1 ~ f2i ai,T F~,ai
(> 0 whenever ai ~ 0)
(9.4.7)
is positive for any redundant variable; recall that the nonredundant variables Xh are uniquely identified by a~, = 0, according to Section 7.1. Then, if u = (121 , ... , k, I )Y
the standardized adjustment of a redundapt variable is defined as
(9.4.8)
331
Chapter 9 - Balancing Based on Measured Data - Reconciliation I vi zi -
(9.4.9)
. (Yvi
The
variable
with greatest absolute
value ]zil
is c o n s i d e r e d
most
suspect
being the source of a gross error. Here and also in the sequel, we shall need some additional remarks concerning the generalized Euclidean scalar products and norms of vectors. See Section B.10 of Appendix B. Let S be generally a symmetric positive definite N x N matrix. Designate (9.4.10)
( a [ b ) s = a T Sb and llalls = (a [ a)su2
for any two N-vectors a, b; if S is unit matrix, we have the canonical Euclidean scalar product (B. 10.1) and norm (B. 10.3). We can again introduce the notions of orthogonality and orthogonal decomposition with respect to (9.4.10); let us briefly outline the construction. Two vectors a and b are called S-orthogonal if and only if
(9.4.11)
(a I b)s = 0 . Let Q be an orthogonal matrix diagonalizing S, thus QT SQ = diag(s 1 , --. , SN) 9 Denoting T = diag(~/s,, ... , ~/SN) we have ( a l b ) s = (a' [ b') where a' = TQTa and b' = TQTb
and where (a' [ b ' ) is the canonical scalar product; hence ( a l b ) s = 0 if and only if (a' I b') = 0, whatever be the diagonalizing orthogonal matrix Q. Let V be a subspace of IIN; for a moment, let us designate V' = T Q T V the space of vectors TQTv where v ~ 'g. If V '^ is the canonical Euclidean orthogonal to V' introduced according to (B. 10.13), let % " = (TQT) -1 V ,^ be the space of vectors (TQ T ) l w where w ~ V'". Then b ~ Vs^ means, for any a ~ V (b I a)s = (b' I a') where
b'=TQTb~
V '^
a' = T Q T a E
V'
hence (b' I a') = 0, hence (b[ a)s = 0. Thus given 'I7, the subspace denoted as Vs^ is the S-orthogonal to 'E. It is uniquely determined by the condition b e Vs^ if and only if ( b [ a ) s = 0 for any a e V.
(9.4.12)
of
Material and Energy Balancing in the Process Industries
332
W e shall not need the construction, but only the fact that the S-orthogonal is uniquely determined and, as is readily shown is a supplementary subspace to '12, hence dim qTs^ = N - dimq/'
(9.4.13)
as in (B.10.14). For any vector x e R N , we thus have the unique S-orthogonal
decomposition x = xl + x2 where xl e q/and x 2 e q2s^ .
(9.4.14)
Let now a and b be two nonnull elements of R N . Taking q/as the onedimensional vector space generated by vector a, b is uniquely decomposed b=ka+b'
whereke
Rand(alb')s
=0.
Thus (a I b)s = kllall~ while lib I1~ = k 2llall~ + lib' I1~ hence (alb)~
= k2llalls2 [lall~ Ilalls2 (k2 Ilall~ § IIb'lls2) -- Ilalls2 Ilblls2
with equality if and only if b' = 0. Consequently I (a [ b)s [ -< Ilalls Ilblls
(9.4.15)
with strict inequality unless vectors a and b are parallel thus b = ka, k ~ R. W e further have (llalls + Ilblis)2= Ilall~ + Ilbll~ + 211alls Ilblls and Ila + bll~ = (a + b l a + b)s = Ilalls2 + Ilbll] + 2(a ] b)s -Ilalls2 + Ilblls2 + 211alls Ilblls by (9.4.15), hence
Ila + blls ~ Ilalls + Ilblls
(9.4.16)
with strict inequality unless a = 0 or b = 0. or b = ka, k > 0; in particular
Ila + bll~- Ilall~ + Ilbll~ if (a I b)s = O.
(9.4.16a)
Chapter
9 -
Balancing Based on Measured Data - Reconciliation I
333
In (9.4.7), let us put S = F~!
(9.4.17)
which is an H • H symmetric positive definite matrix. Thus (9.4.7) (y2
2
,
2
, 2
v~ = fi (a'i]ai)s = f i ]lai
IIs
9
(9.4.18)
On the other hand, by (9.3.2) with (9.3.4) and (9.3.6) v = -FA'T SA'e
(9.4.19)
hence by (9.4.4) with (9.4.5) and (9.4.6) I
Vi ---- - f (all fl ej a~ )s
9
(9.4.20)
Consequently, according to (9.4.9), for any redundant variable x i 1
Zi
-"
Ila'ills
I
E ej (a'i I a] )s
9
(9.4.21)
J=l
Let some j-th redundant variable be subject to gross error ej; neglecting the other e i we have
r zjl - l ejl
1
]la]lls while I z~ I
- [ejl Ila~lts I(a'i laS)s I [ ejl Ila]lls
by (9.4.15), hence I Zi I ~ ]Zjl
(9.4.22)
for any other redundant variable xi, with equality only if the column vectors a'i and a I are parallel. This inequality motivates looking for the source of a gross error among the variables with greatest value of I z~l. Observe that if the column vectors a] and ah are parallel then I zi I = I Zh I
(9.4.23)
because then a~, = ka'i thus in (9.4.21) (a~la I )s = k(a] ] a~ )s for each j and Ila~lls- I kl Ila'ills, hence zh = - % . So in particular for a mass balance, the
Material and Energy Balancing in the Process Industries
334
(nonull) vectors a'i are columns of the reduced incidence matrix of the graph obtained by merging the nodes connected by unmeasured streams; see Chapter 3, graph G* and Eq.(3.2.3). For two parallel streams of G* (such as Jl and J2 in Fig. 3.7), the two corresponding column vectors are parallel (being of the same two endpoints), hence we have the equality (9.4.23). For a system of mass balance equations, the method of standardized adjustments makes no distinction among parallel streams of the reduced graph G*. Because gross errors are (considered) responsible for values of amin exceeding the critical value (9.4.3), one expects that including the measured variables subject to gross errors among the unmeasured ones will decrease Qmin substantially, in the manner that the new Qmin will not exceed the critical value 2 XI-~ (H-H~); H~ is the number of the deleted measured variables. Instead of performing new reconciliation for any such tentative deletion, methods have been proposed for direct computation of the new Qmin(Romagnoli and Stephanopoulos 1981, Crowe 1988). It can be shown in particular that deleting one (redundant) variable (say, xi ), the new value (say) O ~r ~) equals lo(i) ~,min =
Qmin-Zi2
(9.4.24)
where z i is the standardized adjustment (9.4.9). Let us first prove a lemma. Let A[M, M], B[M, N], C[N, N] be three matrices such that
D=
(A" / BT C
(9.4.25)
is symmetric positive definite.
Then, clearly, A =
A T, C - C T,
and because, for any w, r 0 resp. w2 :;/: 0
0D/ 0w / = wTAw, > 0 resp. (0, wT)D (0/
= wTCw: > 0
W2
we have A and C symmetric positive definite. In addition D is invertible, thus the partitioned matrix
D_l= / U Z ) } M ZT
W
M
N
}
(9.4.26)
N
is also symmetric positive definite and U, W are symmetric positive definite. Since
/ / Au+"zT Az+"w /
/ A "/( BT C
ZT W
BTU + C Z T BTz + C W
C h a p t e r 9 - Balancing Based on Measured Data - Reconciliation I
335
is unit matrix, we have AU + BzT= IM
AZ+
BW=0
(unit matrices) BTu + C Z T= 0
B Tz + C W = I N hence Z = -A l B W
and also
Z T "- - C -1 B T U
(9.4.27)
thus from A U - B C "l B T U = I M and
-B T A "l B W + C W = I N
follows (A - B C -1B T )U = I M and
(C - B T A l B ) W = I N
(9.4.28)
where A - BC l BT =
U "l
is M x M s y m m e t r i c positive definite
(9.4.29)
and C - BTAtB
= W t is N x N s y m m e t r i c positive definite.
T h e l e m m a thus determines the inverse of the partitioned matrix (9.4.25). It will be also later useful.
Let us now return to the adjustment v computed by (9.3.2) V - -FA 'T ( A ' F A 'T )-1 r'
(9.4.30)
where (9.3.1) r' = A ' x + + c'
(9.4.31)
with a m i n by (9.4.1). W e already know that deleting the measurement of a nonredundant variable does not alter the value of Qmin ; a nonredundant variable x h is characterized by ah = 0 in (9.4.6), hence we suppose a'i ~ 0 for a deleted variable x i . More generally, let us delete some H~ (< H) measured variables, say x 1 , ..., XH~ with an appropriate re-ordering, and assume that the column vectors a'i (i = 1, . . . , H 1 ) are linearly independent. The deleted variables are now formally regarded as unmeasured. Matrix A' is partitioned
A'=(A
1,A
2) }H
Hi I-H1
(9.4.32)
336
Material and Energy Balancing in the Process Industries
where A~ is of column vectors al, .-. , a'Hi , with full column rank '
rankA 1 = H 1
(9.4.32a)
Our goal is to prove the formula (9.4.33)
Qmin = Q2 + ~
where Q2 is the new (reduced) value of the criterion (with H 1 measured variables deleted), and where 5 = r 'T Nr'
(9.4.33a)
with (9.4.33b)
N = SA~ (AT SA1 )-I A T S ;
S is the matrix (9.4.17). Recall the full row rank of matrix AT, thus AT SA~ is invertible. By regular transformation, using H x H regular matrix Z1
} H1
Z2
} 1-12= H-H 1
(9.4.34)
Z
we obtain
ZA' =
/iI
H1
0 A~
thus ZA~ =
/ill 0
(9.4.35)
H1 with H~ x H1 unit matrix 11 . The transformation corresponds to the elimination of H2 linearly dependent rows of matrix A~. The equation (condition of solvability) A'x + c' = 0 now reads, in equivalent form (Z1A'x
+ Zlc' = 0 and)
(Z2AIX1 +) Z2A2x 2 + Z2g' = 0
where x 1 is the subvector of deleted variables; we have Z2 A1 = 0. Because x2 is now the vector of variables regarded as measured, the second equation is the new condition of solvability. By reconciliation, with residual
r~ = Z2 A2x~ + Z2 c' = Z2 (A~x~ + A2x~ + c') = Z2 r'
(9.4.36)
337
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I the new value of the criterion computed according to (9.3.10) with (9.3.6) equals Q2 = (Z2 r') T (Z2 A2 F2 (Z2 A2 )T )-1 ( Z 2 r')
(9.4.37)
= r 'T Z T (A~ F2 A2T )-i Z2 r' where F z is the covariance matrix of measurement errors in x 2 . We a s s u m e
(F, /
F =
(9.4.38)
F2
hence the subvectors of errors in x~ and x 2 are uncorrelated. We have (9.3.6)
(9.4.39)
S = (A'FA 'T)-I . We shall also need the matrix Z A ' F A 'T Z T =
/
F1 + A2 F2 A~T A~ F 2 A~T
A2 F2 A2T / A~ F2 A2T
(9.4.40)
computed according to (9.4.35) with (9.4.38). Using (9.4.37) and (9.4.33a and b), we find Q2 + 8 = r 'T S(A, (A T SA 1)" A T + S" Z~ (A~ F 2 A~T )-i Z2 S-1 )Sr' where (denoting Z -T-- (Z T )-1)
Z 2 S" = Z 2 A'FA 'T Z TZ -T "-- (A 2 F 2 A~T, A 2 F 2A2T ) Z "T by (9.4.40) with (9.4.34), hence Q2 + 5 = r 'T SZ -1 (ZA 1(A T SA l )-i A T Z T + p)Z-T Sr' where P = ZS "1 Z T (A2 F2 A2 T )-1 Z2 S-i Z T
=
(
A~ F2A~T ) )-1 A;F 2A;T (A;F 2A; T (A;F 2A~T,A;F 2A;T)
_ ( A2 F2 A2T (A2 F2 A2T )-1 A~ F2 A~T
A~ F2 A2T "~ A~ F2A~ T
A2 F2 A~r
)
and where we use (9.4.35) for ZAI, thus ZAl (AT SA1)-I AT zT = /
0Il / ((ZA1)Tz-T SZ-1 (ZA1))-1 (11,0)
338
Material and Energy Balancing in the Process Industries
where Z T SZ 1 = (ZS 1 Z r )-1 is the inverse of matrix (9.4.40). We use the above lemma. Denoting the matrix by D (9.4.25) we have
ZAIASAIIATZT: / I1 / 0
-
/ / 11 0
U -1 (I 1
((I1, O)DI
(I1 / 0
)-1(I1 , O)
0)
0
0
with (9.4.29), thus with U m = F~ + A~ F 2 A~T- A~ F2 A2T (A~ F 2 A~T )-1 A~ F 2 A~T . Consequently
Q2 + ~5 = r ' r s Z ~ (
= r 'T SZ-1
U10 / Z-T 0 0 + P) Sr' ( FI+A2F2A~T A2 T A 2 F2
AEF2A2T )Z_TSr , , A2 F2 A2v
and using again (9.4.40), with (9.4.39) we have Q2 + 5 = r 'T SA'FA 'T Sr'= r 'T Sr' = Qmin according to (9.3.10). We thus have proved the formula (9.4.33).
The reduced criterion Q2 = amin - ~
(9.4.41)
with (9.4.33a and b) would be obtained if the H~ variables were regarded as unmeasured. In particular if H~ = 1, thus if one, say the i-th variable is deleted, we have A 1 = a'i (one column vector) and ~i =
(a'i I r')s 2 IIa'i IIs2
(9.4.42)
with the same notation as in (9.4.18) etc. The formulae are due to Crowe (1988). Although conceptually different in its way of derivation, the method published by Romagnoli and Stephanopoulos (1981) leads to the same result. The proof given above makes it possible to generalize the method for the nonlinear case (see Chapter 10, Section 10.5). Of particular interest is the formula (9.4.42). Recall now the formula (9.4.7) thus
Chapter
~2
vi = f i
9 - Balancing Based on Measured Data - Reconciliation I
.2
, 2 Ilai II s
339 (9.4.43)
and the formula (9.3.2) instead of (9.4.19). Thus, with (9.4.8), Vi "- ~ i V =
- f i r ,iT
Sr' = -fi (a'i I r')s
(9.4.44)
according to (9.4.4). Consequently, by (9.4.9)
2
(a'i I r')s2
Zi =
(9.4.45)
IIa'i IIs = which is (9.4.42). Using the equality in (9.4.41), for one deleted variable we thus have the result (9.4.24). In this case, the square of the standardized adjustment just equals the reduction of the criterion if the variable is deleted as measured. Deleting more than one variable, ~5(9.4.41) generally does not equal the 2 Recall that we have assumed linearly independent columns sum of squares zi. a'i in submatrix A~ (9.4.32). Let us now suppose that we have added some other variable, say xj, to the unmeasured ones, and let
aj =
i=1
kia i
be a linear combination of the former columns. But according to (9.4.35), ZzA1 = 0 thus Z2 a] = 0 for i = 1, ... , H i , hence also Z2 aj = 0. Having transformed the matrix A' and restricted to the last /42 = H-Hi rows as corresponds to the deletion of measurements xi (i = 1, ..., H~ ), the j-th variable becomes nonredundant. Its additional deletion thus brings no change in the criterion, although we can have found zj r 0 in the original system of measured variables. Thus the squares zi2 are not simply additive, and when deleting the variables, we restrict ourselves to the assumption (9.4.32a) of linear independence of the (deleted) columns a ' i . Let us specify the result for the case of mass balance equations. As stated in Remark (i) to Section 7.2, the matrix projection (elimination) is equivalent to the graph reduction according to Chapter 3. As already mentioned in the text after formula (9.4.23), the (special form of) matrix A' after elimination of nonredundant variables (zero columns of A') is the matrix A* (3.2.3), reduced incidence matrix of graph G*. The latter graph arises after merging the connected components of subgraph G O(graph G restricted to unmeasured streams). Now any deletion of a (redundant) variable means further graph reduction, viz. by merging the two endpoints of the deleted arc, which are connected by the (now unmeasured) stream; clearly, not only the given deleted arc (stream), but also all other arcs connecting the two nodes (parallel arcs of G*) are thus deleted and the
340
Material and Energy Balancing in the Process Industries
corresponding variables become nonredundant. Recall that also all the named variables (mass flowrates of the parallel streams) are found as equally suspect of causing a gross error (the same value of ] zi ] ). Now having deleted these arcs by merging, we have a new connected graph, say G**, in which some (originally nonparallel) arcs can become parallel. Imagine
deleted as suspect in G*:
giving in G**:
Fig. 9-6. Successive graph reduction
And so on, deleting successively suspected streams. So in the case of mass balances, the deletion of suspect variables can be effectively performed along with graph analysis. In practice, the (on-line) gross error identification procedures have to be combined with on-site checking of measuring instruments. See Madron (1992), Chapter 4 in particular.
Remark Another method of searching for the source of a gross error is the
analysis of residuals. The analysis is straightforward when all the variables are being measured. If (generally) gl (9.4.46)
g(x) = 0 where g =
L
Chapter 9
341
- B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
is the model (with state variable z = x, measured) then F1
= r = g(x §
(9.4.47)
rM is the residual, most likely r r 0. Here, we suppose that the individual components gm are, each, 'physically meaningful' in the manner that the equation gm (X) = 0 represents, for instance, some well-defined balance. Then an elevated value of rm signals possible presence of a gross error in some variable occurring in the equation. So far, we have admitted only measurement errors. Another source of discrepancy (imbalance) can be a fault in the model itself. We do not consider the cases when some well-defined item (say, mass flowrate of some stream) has been omitted. Still, some unforeseen material or heat (energy) loss can occur; perhaps also a significant change of accumulation in some node can have been neglected by the steady-state hypothesis, and the like. Then the m-th equation (balance) reads correctly gm (X) - d m
(9.4.48)
where dm is the model error. Then, as gm ( xt ) -- dm for the true value x t of x, with X+ - Xt + e (9.2.4) we have Fm ---- gm ( xt +
e)
- gm ( xt ) + d m .
(9.4.49)
If the model is linear thus g(x) = Ax + c, we thus have r - Ae + d where d = ( d l , "", du)T
(9.4.50)
is the vector of model errors. Thus in particular a gross model error dm will affect the m-th residual r m . If some variables are unmeasured, matrix A is replaced by the above A'. Due to the arbitrariness in the matrix projection (ZA' is equivalent to A', with arbitrary regular Z[H, H]), the components of the residual vector r' = A'e + d'
~
(9.4.51)
admit generally of no physical interpretation. Only in the set of mass balance equations, the transformation (elimination) can be carried out in a 'canonical' manner, viz. by graph reduction. Then the h-th component r~ (h = 1 , - . . , H) represents the imbalance of the h-th node of reduced graph G*. [In particular a
342
Material and Energy Balancing in the Process Industries
single gross model error dh is thus uniquely detected; observe only that the node balances of G* do not contain the reference node balance.] We can also introduce standardized residuals. By (9.3.6), the h-th residual variance equals 0.2~ = 8 h A'FA 'T 8~
(9.4.52)
where 8h is the h-th unit row H-vector; thus 8 h A' = t~h is h-th row vector of matrix A', of i-th component equal to __1 if (in the reduced graph) arc i is incident to node h, else zero. Let us again assume diagonal F. Then, as the reader easily verifies, we have 0.2~ = Z fi where fi = (Yi2 i~(h)
(9.4.52a)
is the i-th diagonal element of F, and (h) is the set of arcs i incident to node h of the reduced graph G*. Then the h-th standardized residual equals
(say) Wh-
%
9
(9.4.53)
We then regard as most suspect the balance with greatest I Whl. Again, a simultaneous graph analysis can prove helpful.
9.5
SYSTEMATIC ERRORS
Let us recall the zero-mean hypothesis (9.2.4a). More generally, if the mean E(ei ) = ei0 r 0 for some measured variable xi then this ei0 is called the bias of the random variable (measurement error) ei. It is a theoretical definition relative to the assumed probability space. In practice, the presence of a bias is regarded as a systematic error of the measurement. It can be due to an imperfectly adjusted instrument, its inadequate placing, or also be a property of the measuring method itself; see again Madron (1992). The present book is not concerned with problems of measurement proper. Let us only show how the presence of biases affects the reconciliation. Let us designate eo = E(e)
(9.5.1)
the/-vector of biases, where we admit e0 r 0. Then, in lieu of (9.2.4b), the covariance matrix of measurement errors equals, by definition (E.1.8) F = E((e-eo )(e-eo )T ) .
(9.5.2)
Chapter 9
-
B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
343
I f we know the vector e 0 , it is natural to subtract this e 0 from the measured vector x + and reconcile the vector x+-e0. This procedure (subtraction of systematic errors) is called compensation. The compensation is widely used in practice. A typical example is compensation of flowrates measured by orifices for the deviation of actual density from that supposed in the instrument design. The na'fve approach (see Section 9.1) leads to replacing the condition (9.1.9c) by (~, _ x + + eo )T F-1 (~ _ X + + eo ) = m i n i m u m .
(9.5.3)
The maximum likelihood principle is generally formulated again in the form (9.1.12). If the error vector is Gaussian, with (9.5.1) used in (E.2.5-9) where a = e 0 we have, in lieu of (9.1.13)
fx(X +- ~,) = k exp - 2
1
(~ - x+ + eo
)T
1 ) F- (:~ -x + + eo)
(9.5.4)
and the same consideration then leads again to the condition (9.5.3). Thus x + is replaced by x+-e0 and the correct reconciliation formula reads, in place of (9.2.15) ~c = x + - e0 + v c
(9.5.5a)
where v r = _FA,T (A,FA,T)-1 (A,x + + c' - A'eo ) ;
(9.5.5b)
~c means the correctly reconciled value. If we don't know %, we reconcile again according to (9.2.15) getting the estimate ~,, with adjustment v of x +. Observe that by (9.3.1 and 3) we have again r' - A ' x + + c' = A ' e
(9.5.6)
and A ' v = -r' = -A'e
(9.5.7)
while E ( r ' ) = A'e0
(9.5.8)
E(v) = -FA '+ ( A ' F A '+ )-1 A ' e o .
(9.5.9)
344
Material and Energy Balancing in the Process Industries
W e thus have v c - v - E(v) thus E(v c ) - 0 and, as i c ~c
=
x t +
(9.5.10)
e - eo + v~
e - e0 + v c thus E ( i ~ -
_ Xt =
x t) =
0
(9.5.11)
while the random variables v and ]~ - X t -
e
+
v
giving E ( i
- x t ) -
Pe 0
(9.5.12)
are biased. Here, P is the projector (9.3.21); see Remark (iii) to Section 9.3. Given matrix A', also the random variable (H-vector) r' is biased by (9.5.8); denoting r o = A ' e 0 (= E(r'))
(9.5.13)
the variable has a noncentral distribution with H x H symmetric positive definite covariance matrix Fc = E((r'- r o )(r'
_
r o~ ) T ) = A ' F A 'T
(9.5.14)
according to (9.5.2) and (9.5.6). The matrix is the same as in the unbiased case (9.3.6); if e is Gaussian then also r' is (noncentral) Gaussian. Algebraically, the adjustment v and the estimate i obey all the relations derived above; in particular ~: obeys the solvability condition (9.2.7) (thus ~, ~ 914+ ) and v = :~ - x § obeys the condition (9.2.5b), hence also the conditions (9.2.18 and 19) are fulfilled. Only the statistical characteristics differ, and the maximum likelihood condition (9.5.3) is not satisfied if e 0 ,: 0. If systematic errors are present but not known, the computed statistical characteristics provide an incorrect information on confidence intervals such as (9.3.56). Observe that for example with (9.5.12), the corresponding covariance matrix equals by definition F~ = E ( ( i - x t- Pe o )(i - x t-
Peo)*) =
PFP T
(9.5.15)
according to (9.5.2) and because ~ - x t = Pe; hence it is the same matrix as (9.3.43), giving also the same variances (diagonal elements) t~~i" 2 But we now have, for the i-th component
E(xi- xl)
-
~i
Pe0
Chapter 9
- B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
345
with i-th unit r o w / - v e c t o r ~ i ; with the notation (9.5.14) and denoting again (9.4.17) S = F~!
(9.5.16)
we have, in the case of uncorrelated errors (say) wi
= E(.~i
_
t
xi)
-
ei0
_
2 (Yi
(a'i I r0 )s
(9.5.17)
where ~ is again the i-th diagonal element of F and a'i the i-th column vector of A'. Thus in place of (9.3.56), if the distribution is Gaussian we now have P{ I&i- xl- Wi [ < ~ i UI-(L/2 }
--
1- a
(9.5.18)
which is the probability of t Xi - 0'~ i/'/1-or/2 - Wi < Xi < "~i q" 0"~ i/'/1-~2 - Wi "
(9.5.18a)
Hence having estimated Xi the true value x itwill lie, with probability 1-tx, in the above interval nonsymmetrically distributed around ~i, with unknown wi. Observe that in (9.5.17) we have by (9.5.13) I
(a] [ ro )s = j=s ej~ (a'i [ a])s
(9.5.19)
hence generally, a systematic error in measured variable xj (j r i) affects also the probability distribution for the estimate ~i. The detection or even identification of systematic errors is even more tricky than for gross errors. Of course a systematic gross error is a gross error that occurs repeatedly in a series of measurements. Smaller systematic errors can be detected as a systematic occurrence of positive or negative values of adjustments. Also the residuals r' can give some information. If the same matrix A' is used in a series of reconciliations then the average value of r', at least in absence of gross errors and with a great number of measurements, will approximate E ( r ' ) = A'e 0 .
9.6
MAIN RESULTS OF CHAPTER 9
The linear reconciliation problem is a problem of minimum under linear constraints; see Section 9.1. The vector x § of measured values has to be adjusted by some vector v in the manner that the vector :~ = x § + v
(9.6.1)
346
Material and Energy Balancing in the Process Industries
obeys the solvability condition e M +.,
(9.6.2)
see Chapter 7. Thus if certain variables (subvector y) are not measured, the constraint equation is solvable in y when x = z~ obeys the condition; if all variables are measured, M + is simply the set M of solutions. The minimum condition can be based on intuitive considerations ('smallest distance' between x + and i), or on the maximum likelihood principle (9.1.12). If in particular the distribution of measurement errors is considered Gaussian with zero mean, the former and the latter criteria coincide and we have the minimum condition (9.1.14) ( ~ _ X + )T F-1 ( i _
X+ ) = minimum (~ ~ M + ) ;
(9.6.3)
here, F is the covariance matrix of measurement errors. The vector ~ is the sought estimate and v (9.6.1) is the adjustment. In practice, the ('smallest distance') condition (9.6.3) is commonly adopted if the distribution is Gaussian or not (frequently unknown except for the covariance matrix F). When the constraints are linear, the reconciliation problem is uniquely solvable whatever be x+; see Section 9.2. The solution ~ is uniquely determined by the theoretical conditions (9.2.18 and 19) where By + Ax + c = 0 is the linear model, and ~ ~ M + means that the equation By + A:~ + c - 0 is solvable in y .
(9.6.4)
Explicitly, the solution can be found when using the matrix projection (elimination) according to Chapter 7. We suppose again that the matrix (B,A) is of full row rank M, and we designate L = rankB. Using in particular the canonical format (7.4.4) with (7.4.5 and 6), we can rearrange and partition the unmeasured variables
y =
( y ~ / } L~
y
observable
(9.6.5)
} J-L o unobservable
according to the partition of columns in (7.4.5), and the matrix (A", c") in (7.4.4) according to the partition of rows in (7.4.5)
I A o c~ I } L~ (A",c")= A'~ c'~ } L-L o
(9.6.6)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
347
Then the equivalent set of equations reads I!
Yo
+ Ao x + c o = 0
(IL_Lo , B* )y* + A'~ x + c~" = 0
A'x + c '
(9.6.7)
=0
where the last equation represents the solvability condition x ~ M § Then R = x + + v where v = -FA 'T ( A ' F A 'T )-1 r'
(9.6.8)
with the residual r' = A ' x § + c' ;
(9.6.8a)
see (9.2.15). If L 0 > 0 and setting x = ~,, by (9.6.7)~ we can compute the observable subvector Y0 of y. If J - 0 (all variables measured) we compute only by (9.6.8) where A' = A and c' = c (no elimination). If L = J (full column rank of B) then also L 0 = J and the whole subvector y is observable; it is computed by (9.6.7)~ where Y0 = Y, A0 = A , c 0 = c", with x - ~. In this case, we can use also other formulae, which do not require a special elimination (matrix projection) program; see (9.2.24) with (9.2.21 and 23) thus (9.2.24a), or (9.2.30) with (9.2.26-29). In (9.6.7 and 8), we can partition the matrix A' by (7.4.6), thus the vector x It
x =
I x * ) } I-I o redundant xo
} Io
t!
l!
(9.6.9)
nonredundant
with subvector x 0 of nonredundant variables. If the matrix F is diagonal (measurement errors uncorrelated), the subvector x o remains unadjusted; see Remark (iii) to Section 9.2. If it happens that the degree of redundancy H (= M-L) equals zero then the solvability condition (9.6.7)3 is absent and all the measured variables are nonredundant and nonadjustable (no reconciliation). The /-vector e of random measurement errors, by hypothesis of zero mean and with covariance matrix F (9.2.4a and b), generates the assumed probability space. According to Appendix E, functions of e are then also random variables and we can compute their statistical characteristics; see Section 9.3. The adjustment v depends linearly on e by (9.3.2) with (9.3.4). Its mean equals zero (9.3.7) and its covariance matrix F v (see (9.3.8) with (9.3.6)) is singular. The minimum value of the criterion (9.6.3) Qn~. = vT F-1 v
(9.6.10)
348
Material and Energy Balancing in the Process Industries
is a random variable whose mean equals the degree of redundancy (9.3.11). If e is (assumed to be) Gaussian then Qn~n has the chi-square distribution with H degrees of freedom. We further introduce the I x I matrices (called later 'projectors') p. = FA,T (A,FA,T)-1A'
(9.6.11)
P = I - P*
(9.6.12)
where I is unit I x I matrix; see (9.3.46) and (9.3.21). Whereas A' depends on the way of elimination, the above two matrices are determined by (B,A) only. Whatever be the true value x t of x (9.2.4), the difference ~,-xt (error committed by estimate ~,) depends (linearly) on e only (9.3.41) and is again a random variable, of zero mean. Its covariance matrix F~ (9.3.43) is, however, singular. If the observable subvector Y0 (9.6.5) is computed by (9.6.7) where x = ~, we have the estimate 5'o for the true value y~. The difference S'0 - Yo is again a random variable with zero mean and covariance matrix F% (9.3.22). If (and only if) the condition (9.3.23) is fulfilled, the covariance matrix F% is regular (positive definite) and ~'0 has a probability density as introduced in Appendix E. In particular if L = J (full column rank of B) thus if the whole unmeasured subvector is observable, the condition (9.3.23) is the condition (9.3.26) of full row rank of submatrix A; in a system of mass balance equations, the condition is interpreted structurally by (9.3.32). The condition satisfied, if in addition e is Gaussian then the scalar random variable Q~ (9.3.27) has the chi-square distribution with J degrees of freedom. If L = J (~' = S'0 ), the matrix F~ can also be computed by other formulae; see (9.3.29) with (9.2.21 and 23), or (9.3.30). Generally, the propagation of errors among variables u computed using the estimate :i can be characterized as shown in Remark (ii) to Section 9.3. If again u t is the true value and ~ the (computed) estimate, we obtain the covariance matrix FQ of random variable ~-u t . If F~ is positive definite and e Gaussian, we can compute the probabilities (9.3.57); see the illustrative example (with Fig. 9-5) following after the formula. In particular the confidence intervals such as in (9.3.56) can be computed. The variances G~2 (9.3.51) resp. (y2~ (9.3.52) are computed as diagonal elements of matrix F~ resp. F~; see (9.3.62 and 63) with (9.3.60). According to (9.3.65), the reconciliation improves the precision of the estimates. The error committed by the estimate :i thus ~,-xt is the projection Pe (9.3.41) of the error vector, while v = -P'e, with (9.6.11 and 12). The two projections are, in a certain sense, orthogonal as illustrated by Fig. 9-4 with the text following after (9.3.50). The idea of orthogonality is generalized in the fine-printed paragraphs following after (9.4.9), and used later in Chapter 10. Theoretical possibilities for the detection and identification of gross errors are analyzed in Section 9.4. Assuming the measurement error vector
Chapter 9
- B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
349
Gaussian, a gross error is detected when the value of Qn~, (9.6.10) exceeds a critical value (9.4.3). Searching for the source of a gross error, the first candidate is the variable xi with greatest absolute value of the standardized adjustment zi. Here, we assume diagonal covariance matrix F with elements (variances) I:Y2i (i = 1, . . . , / ) . Then zi - vi/(Yv~ where vi is the i-th adjustment (component of v), and cy2Vi the i-th diagonal element of matrix F v The latter values can be computed using the matrix A' with columns a'i (i - 1, . . . , / ) ; then 2 T O'vi --" CYi ( a ' i ( A ' F A
1
~ )1/2
'T )- a i
.
(9.6.13)
For a nonredundant variable, we have Gv, = 0 as well as vi - 0; at the same time, the value of Qmin is not affected by any error in the variable. Hence such gross error is not detected (but it can still affect the estimates of the unmeasured variables). For a system of mass balance equations, A' can be considered as reduced incidence matrix of the graph G* (see Chapter 3); the graph is obtained by merging the nodes connected by unmeasured streams. If two arcs (i and i') of G* are parallel then the corresponding squares of the standardized adjustments (z2 and z2.) are equal; the method makes no distinction between the two variables. Considering again a general linear model, for a redundant variable the square zi2 equals the reduction of the criterion Qn~n When the variable is deleted as measured (9.4.24). More generally, using the formulae (9.4.33) we can compute the reduction of the criterion when more measured variables are deleted simultaneously, with the condition (9.4.32a). But at least for a set of mass balance equations, rather a successive deletion of variables, along with graph analysis can be recommended; the endpoints of the deleted arcs are successively merged and the graph sucessively reduced. In a system of mass balance equations, the equation (9.6.7) 3 can be formulated as the mass balance of the reduced graph G*, hence the residual r' (9.6.8a) represents a vector of node imbalances. Then also an analysis of residuals makes sense; see Remark to Section 9.4. Suppressing the zero-mean hypothesis for the error vector e, we admit a nonnull bias E(e); see Section 9.5. Of course if the bias e 0 is known, it is subtracted from the measured value x + before the reconciliation. If unknown, we cannot but compute the adjustment and estimates as above. The estimate i will again obey the solvability condition; only it will not conform to the maximum likelihood priciple, and will be biased (9.5.12). Having computed some estimate :~, the true values will lie with a nonsymmetrically distributed probability around the estimated values (9.5.17 and 18 with 18a). If a nonlinear model is linearized, the reconciliation problem can be solved by linear methods. More generally, nonlinear reconciliation problems can be solved using successive linearisation, as will be shown in Chapter 10.
350 9.7
Material and Energy Balancing in the Process Industries
R E C O M M E N D E D LITERATURE
The analysis of problems associated with reconciliation as presented in this chapter is largely self-contained. It does not mean, of course, that the basic ideas are new. Many of them occurred already at the beginning of the nineteenth century as the least-squares principle. Motivated empirically, the idea was first published by A.M. Legendre in 1806, at the end of his treatise 'Nouvelles mrthodes pour la drtermination des orbites des com~tes' in an astronomical context. But the priority belongs most likely to K.F. Gauss who would not make haste with publication of his results. The method was published in his 'Theoria motus corporum coelestium' (1809), and supported by mathematical arguments. Further development is due to K.F. Gauss and P.S. Laplace, and to a number of further authors up to nowadays. Despite of the mathematical arguments, in the end the method (as well as its further development along with the concepts of probability) is based on intuition. It is not our goal to follow the history, disputations, and controversies among theorists (mathematicians and physicists) concerning the principles. In practice, the statistical methods are well-established, thus also in the frame of measured data processing. The practical aspects of measurement and reconciliation are dealt with for instance in Madron (1992). Explicitly, we refer in this chapter also to Kub~i~ek (1969 and 1976), Knepper and Gorman (1980), Romagnoli and Stephanopoulos (1981), and Crowe (1988). The topic of linear reconciliation is a classical one and possible further modifications of the methods are only formal. Let us perhaps mention an algebraically different approach to reconciliation with partially unmeasured data, as presented by Darouach et al. (1986). Recently, more attention has been paid to the detection and identification of gross errors (Romagnoli and Stephanopoulos 1981, Ioridache et al. 1985, Tamhane and Mah 1985, Narasimhan and Mah 1987, Narasimhan 1990, Serth and Heenan 1986, Serth et al. 1987, Crowe 1988, Crowe 1989, Crowe 1992); see also a theoretical paper by Alm~isy and Uhrin (1993). Biased data processing was dealt with by Romagnoli (1983), and in combination with gross errors by Rollins and Davis (1992). Alm~isy, G.A. and B. Uhrin (1983), Principles of gross measurement error identification by maximum likelihood estimation, Hungarian Journal of Industrial Chemistry 21, 309-317 Crowe, C.M. (1988), Recursive identification of gross errors in linear data reconciliation, AIChE J. 34, 541-550 Crowe, C.M. (1989), Test of maximum power for detection of gross errors in process constraints, AIChE J. 35, 869-872
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
351
Crowe, C.M. (1992), The maximum-power test for gross errors in the original constraints in data reconciliation, The Canadian Journal of Chemical Engineering 70, 1030-1036 Darouach, M., J. Ragot, J. Fayolle, and D. Maquin (1986), Validation des mesures par 6quilibre de bilans-mati~re, International Journal of Mineral Processing 17, 273-285 Ioridache, C., R.S.H. Mah, and A.C. Tamhane (1985), Performance studies of the measurement test for detection of gross errors in process data, AIChE J. 31, 1187-1201 Knepper, J.C. and J.W. Gorman (1980), Statistical analysis of constrained data sets, AIChE J. 26, 260-264 Kub~i~ek, L. (1969), On the general problem of adjustment of measured values, Matematic~ (asopis (Czechoslovakia, also in English) 19, 270-275 Kub~i~ek, L. (1976), Universal model for adjusting observed values, Studia geophysica et geodaetica 20, 103-113 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Narasimhan, S. (1990), Maximum power test for gross error detection using likelihood ratios, AIChE J. 36, 1589-1591 Narasimhan, S. and R.S.H. Mah (1987), Generalized likelihood ratio method for gross error identification, AIChE J. 33, 1514-1521 Rollins, D.K. and J.F. Davis (1992), Unbiased estimation of gross errors in process measurements, AIChE J. 38, 563-572 Romagnoli, J.A. (1983), On data reconciliation: constraints processing and treatment of bias, Chem. Eng. Sci 38, 1107-1117 Romagnoli, J.A. and G.S. Stephanopoulos (1981), Rectification of process measurement data in the presence of gross errors, Chem. Eng. Sci. 36, 1849-1863
332
Material and Energy Balancing in the Process Industries
Serth, R.W. and W.E. Heenan (1986), Gross error detection and data reconciliation in steam-metering systems, AIChE J. 32, 733-742 Serth, R.W., C.M. Valero, and W.E. Heenan, (1987), Detection of gross errors in nonlinearly constrained data: a case study, Chem. Eng. Commun. 51, 89-104 Tamhane, A.C. and R.S.H. Mah (1985), Data reconciliation and gross error detection in chemical process networks, Technometrics 27, 409-422
353
Chapter
10
BALANCING BASED ON MEASURED DATA - RECONCILIATION II NONLINEAR RECONCILIATION
With the exception of single-component (mass) balance, the balance models are generally nonlinear, even in the simplest case of simultaneous massand heat balances. While the theory and methods of linear reconciliation are well-developed, for a nonlinear model the difficulties arise at the problem statement itself. They are closely related to the solvability problems analyzed in Chapter 8. The reader will also need the results of Chapters 7 and 9, and Appendices B and E. Let us begin with several simple illustrative examples.
10.1
SIMPLE EXAMPLES AND PROBLEM STATEMENT
As is common in illustrative textbook examples, also the following are not just from industrial practice. Generally, the reconciliation problem is multidimensional and if nonlinear, such detailed analysis as follows is hard or impossible.
Example 1 Recall the example 3 (heating furnace) in Chapter 6, Section 6.3. Having simplified the scheme according to Fig. 6-12 we have
T 4
.q T5 Fig. 10-1. Heating furnace
354
Material and Energy Balancing in the Process Industries
where F is the heating furnace and E is heat exchanger. Methane C H 4 (stream 1) is burnt with air (2), and in the exchanger, the heat of combustion gas (3 and 4) is transferred to crude oil (5 and 6). Measured are the flowrates and temperatures of streams 1 and 2, further the temperatures of streams 4 and 6, and in addition, also the CO2-concentration in stream 4 is measured. The latter measurement is added in order to have a simple example. We make abstraction from how the named quantities are actually measured. Formally, we consider as measured the mass flowrates ( m i ) m 1 --
m~ and m2 - m~ (10.1.1)
mass fraction of CO 2 y 4 _ y4+ = y +
for brevity
and the temperatures T1, T2, i0, 76. Due to the reaction scheme CH 4 +
2 02 = CO2 + 2 H20
and to the assumption that methane is completely burnt, we have the condition y4m 4
mI
Mco2 MH4 thus y4m 4 - k m 1
where k =
Mco
MCH4
(10.1.2)
is ratio of mole masses. In addition the mass balance implies (10.1.3)
m I + m 2 = m 3 = m 4 .
Hence the measured quantities have to obey y ( m 1 + m2 ) = k m 1
(y _ y 4 ) .
(10.1.4)
We shall not write the other equations explicitly. Taking the standard composition of air, as the reader readily verifies also the whole composition of streams 3 and 4 can be computed using the assumed reaction scheme (neglecting the oxidation of nitrogen and estimating the humidity of inlet air), and with the knowledge of standard enthalpies and specific heats, we can compute also temperature T3 from the energy balance. Knowing also T ~, thus the enthalpies of
355
C h a p t e r 10 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation II
streams 3 and 4, we can compute the transferred heat in exchanger E. The named variables are thus observable, while T5 and m5 (= m6) a r e unmeasured and unobservable. The condition (10.1.4) concerns the measured variables y4, m l ' m2 ; it is the solvability condition, while the measured temperatures T l, T2, T ~, Z6 are not affected by the condition, thus nonredundant. It is thus the solvability condition (10.1.4) that has to be obeyed by adjusted measured values (10.1.1). Then, the observable variables are uniquely determined. Denoting m + 1 +
th I -
(10.1.5)
V1, /,h2 -- m +2 + 122, y -- y+ q" W
where v~, v2 , and w are the adjustments, the solvability condition reads (10.1.6)
Y(/'~/l + /'~/2 ) -- k t h l .
Physically, the set is limited in addition by the inequalities /~1 > O, /'~/2 > O' O < y <
1
(lO.1.6a)
and also by the condition that the burning of C H 4 is complete; hence the Oz-content in stream 2 must be sufficient, thus no2_> 2m 1/McH4 where no2 is the mole flowrate of 02 in stream 1. Using the standard air composition, the condition is obtained in the form /'~2 ~ arhl
(10.1.6b)
where a is a constant (-- 17). We suppose that the measurement errors in m 1 , m 2 , y are uncorrelated, with standard deviations Ol, o2, o respectively. With the same motivation as in Section 9.1, the adjustments will be subjected to the condition
v_2_l
v(__~i w~
+
+ ~
(y
Ol
= minimum.
(10.1.7)
Introducing the substitutions mi=--
Y
and
mi
Xi------
(Y
for i -
(10.1.8)
Oi
1 and 2, with x~ and x § for the measured values, denoting
=p
and
~(Y2 O1
= q
(10.1.8a)
356
Material and Energy Balancing in the Process Industries
we have the problem a PXl
- ( X 1 q-
qx2 )x = 0 where x2 >-
q
Xl > 0
(10.1.9a)
and (x 1_ x +1) 2 + ( x 2 _ x 2
+(x-
x
(lO.1.9b)
=minimum.
Eq.(10.1.9a) can be rewritten x~ = f ( x ) x 2 where f(x) = q
x p-x
,0 < x <
p l+a
(< p)
(10.1.10)
thus 0 < f(x) < q/a. Taking x as parameter, we have the figure x1
x = p / (l+a)
x2 Fig. 10-2 Graphical representation of Eq.(10.1.10).
The reader can perhaps imagine the set of solutions of (10.1.9a) as a surface ,of whose sections parallel to the (x2 , x~ )-plane are the straight lines in Fig. 10-2; hence the surface is generated by straight lines parallel to the (x2, Xl)-plane, intersecting the (vertical) x-axis, and of variable slope fix). A measured point, (x2 , x~, x* )T in the 'normalized' coordinates (10.1.8), lies somewhere above or below the surface ,Of. According to the condition (10.1.9b), the adjusted (reconciled) point (22,2~, 2) T has to lie on ,7J in minimum distance from the measured point. At least if the measured point is not 'too distant' from ,~, without further (mathematically rigorous) analysis one concludes that the adjusted point on ,(f exists and is unique. In contrast to the linear case there is not, however, a simple general formula available for computing this solution explicitly. The problem can be solved using the classical Lagrange method. The
Chapter 10 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation II
357
reader familiar with it can find a set of (four) nonlinear algebraic equations, which can be solved numerically given the measured values and variances. Generally, such numeric routine methods are known as nonlinear programming. A complete (mathematically rigorous) analysis of unique solvability for complex systems can, however, hardly be thought of. We have reduced the whole set of (heat and mass) balances, having directly eliminated the unmeasured variables; it has been possible due to the simple structure examined. Generally, such a priori treatment of the equations is hardly possible for a complex system. Let us thus suppose that the whole system of equations has been written. As follows from the considerations after Eq.(10.1.4), the transformation corresponds to a regular transformation of the Jacobi matrix; for the system of heat- and mass balances, the matrix has been shown to be of full row rank (see Chapter 8). It is this Jacobi matrix that is evaluated in each step of a numeric procedure mentioned above. Let us now recall the solvability analysis in Chapter 8. Having transformed the Jacobi matrix, in the present case we have found the degree of redundancy H = 1 corresponding to the number of independent rows of the transformed matrix after the elimination of unmeasured variables. Assuming nonnull mass flowrates the rank M of the Jacobi matrix is constant as well as H - M-L where L = rankB according to (8.5.10) and (8.5.17); hence also L is constant and the adjustment problem is well-posed according to (8.5.16). This is in agreement with the unambiguous observability and redundancy classification following after Eq.(10.1.4). We thus can expect that also a reconciliation procedure using the full Jacobi matrix will converge, at least with 'not too bad' measured values; see Section 10.4 below.
Example 2 According to the figure
.1
Fig. 10-3. Blending of streams
streams 1 and 2 are blended giving stream 3. The streams are two-component mixtures, of mass flowrates mi and mass fractions yi of one of the components in streams i (= 1, 2, 3). The balances read
Material and Energy Balancing in the Process Industries
358
m I
+ m2
m~ y l +
m2
- m3
y2
_
}
-0
m3 y3
_
0
.
(10.1.11)
Let us have measured yi =
yi+ for i = 1, 2, 3 (10.1.12)
and m 3 = m3 +
with standard deviation (Y3 for (the error in) m~; for simplicity, let all the three standard deviations for yi+ be equal, say tJ. With the substitutions mi
i = 1, 2, 3"
yi
ni = ~
and xi = ~
tJ 3
(10.1.13)
(Y
the m o d e l equations read nl
-t- n 2
- n3
-- 0
J
n 1x 1 + n 2 x 2 - n 3 x 3 = 0 and a s s u m i n g uncorrelated errors, the adjustment condition formulated as (10.1.14a) with 3
a=i~=l(Xi-Xi+ )2
+(n3
_
n3+ )2 _.
minimum
(10.1.14a)
will be again
(10.1 14b)
where superscript + denotes the ( ' n o r m a l i z e d ' ) measured values. N o w clearly, if x 1 ~e x 2 the equations (10.1.14a) are uniquely solvable giving X2-X 3
nt -
X3-X 1
n 3 and n 2 -Xz-X 1
n3
;
(10.1.15)
X2-X 1
if, however, x 1 = X2 then, with positive mass flowrates, we must have also x 3 ---x 1 = x 2, in which case n~ and n 2 are not uniquely determined by the only condition n 1 + n 2 " - n 3 . Hence the solvability conditions for the m e a s u r e d variables read either
x 1 --
or
x~ ~ x 2 and in addition
X 2 ---- X 3
(10.1.16a)
X 3 (= [ X l ,
X2 ]
(10.1.16b)
Chapter
10 - B a l a n c i n g
Based on Measured
Data - Reconciliation