imperial business timeteable
TRANSCRIPT
-
7/23/2019 Imperial Business timeteable
1/130
The Mathematical Modelling of the
Dynamic Behaviour of Process Systems
(l) (g)
+ (g)(l)2 5 5
C H2 4
5
C H2
C H2
+ (g) (l)
C H2 5C H2
C H
(l)
5C H2(l) (g)
5C H2(l)
C H2 5(g)
C H2
(l)
2 5
C H2
4
5
C H
5
Diethylbenzene Rich Recycle
Benzene Rich Recycle
Benzene
Ethylbenzene
Ethylene
C1
C29
5
C.C. Pantelides
Centre for Process Systems Engineering
Imperial College London
London SW7 2BY
Copyright 1998, 1999, 2000, 2001, 2002, 2003
October 2003
-
7/23/2019 Imperial Business timeteable
2/130
Contents
1 Introduction 11.1 The Need for Dynamic Process Modelling . . . . . . . . . . . . . . . . . . . 11.2 Process Classifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Batch vs. Continuous Operations . . . . . . . . . . . . . . . . . . . . 11.2.2 Lumpedvs. Distributed Operations . . . . . . . . . . . . . . . . . . 2
1.3 Conservation Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3.1 General Form of Conservation Laws . . . . . . . . . . . . . . . . . . 31.3.2 Are Conserved Quantities Really Conserved ? . . . . . . . . . . . 4
2 Non-Reacting Lumped Systems 62.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Systems Involving Mass Balances Only . . . . . . . . . . . . . . . . . . . . . 62.2.1 Single Component Material in a Buffer Tank . . . . . . . . . . . . . 62.2.2 Multicomponent Material in a Buffer Tank . . . . . . . . . . . . . . 7
2.2.2.1 The Perfect Mixing Assumption . . . . . . . . . . . . . . . 82.2.2.2 Redundancy of the Total Mass Balance Equation . . . . . . 82.2.2.3 Mass Balance Equations in Terms of Mass Fractions . . . . 82.2.2.4 Formulation of the Accumulation Terms in Conservation Laws 9
2.2.3 Model Completeness and Degrees of Freedom . . . . . . . . . . . . . 92.2.4 Characterisation of the Outlet Flowrate and Discontinuities . . . . . 10
2.3 Systems Involving Mass and Energy Balances . . . . . . . . . . . . . . . . . 122.3.1 Simple Liquid-phase System with Heater . . . . . . . . . . . . . . . 12
2.3.1.1 General Form of the Energy Conservation Law . . . . . . . 132.3.1.2 Simplified Form of the Energy Conservation Law . . . . . . 142.3.1.3 Assumptions and Simplifications in Process Modelling . . . 15
2.3.2 Simple Gas Storage Tank . . . . . . . . . . . . . . . . . . . . . . . . 162.3.3 Gas Storage Tank with Safety Relief System . . . . . . . . . . . . . 18
3 Systems of Differential and Algebraic Equations 213.1 Initialisation of DAE Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.1.1 Initial Condition Specification . . . . . . . . . . . . . . . . . . . . . . 223.1.2 Consistent Initialisation . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Numerical Solution of DAE Systems . . . . . . . . . . . . . . . . . . . . . . 24
3.2.1 Simple Integration Formulae . . . . . . . . . . . . . . . . . . . . . . 243.2.2 Higher-Order Integration Formulae . . . . . . . . . . . . . . . . . . . 263.3 Discontinuities in Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.1 Implicit and Explicit Discontinuities . . . . . . . . . . . . . . . . . . 28
i
-
7/23/2019 Imperial Business timeteable
3/130
ii
3.3.2 Why Discontinuities are Important . . . . . . . . . . . . . . . . . . . 283.3.3 Detection and Location of Implicit Discontinuities . . . . . . . . . . 293.3.4 Restarting After Discontinuities . . . . . . . . . . . . . . . . . . . . . 31
3.3.4.1 Systems Satisfying Continuity of Differential Variables . . . 323.3.4.2 Systems not Satisfying Continuity of Differential Variables 323.3.4.3 Systems Subject to Impulsive Inputs . . . . . . . . . . . . . 343.3.4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4 Lumped Systems with Chemical Reaction 364.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.2 Mass Conservation in Reacting Systems . . . . . . . . . . . . . . . . . . . . 36
4.3 Energy Conservation in Reacting Systems . . . . . . . . . . . . . . . . . . . 374.3.1 Energy Conservation Equations . . . . . . . . . . . . . . . . . . . . . 374.3.2 Chemical Reactions Do Not Generate Energy . . . . . . . . . . . . . 384.3.3 That Heat of Reaction Concept... . . . . . . . . . . . . . . . . . . 38
4.4 Reaction Kinetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.5 Thermal Condition Specifications . . . . . . . . . . . . . . . . . . . . . . . . 414.6 Outlet Flowrate Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.6.1 Variable Volume Reactor . . . . . . . . . . . . . . . . . . . . . . . . 414.6.2 Constant Volume Reactor . . . . . . . . . . . . . . . . . . . . . . . . 42
4.7 Initial Conditions for Reacting Systems . . . . . . . . . . . . . . . . . . . . 43
5 High Index Systems of Differential and Algebraic Equations 455.1 Many DAE Systems are Similar to ODEs ... . . . . . . . . . . . . . . . . . . 455.2 Some DAE Systems are Very Different to ODEs ... . . . . . . . . . . . . . . 46
5.2.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465.2.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3 Index Classification of DAEs . . . . . . . . . . . . . . . . . . . . . . . . . . 485.3.1 Definition of Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4 Integration of High Index DAE Systems . . . . . . . . . . . . . . . . . . . . 495.5 High Index DAEs in Process Engineering Applications . . . . . . . . . . . . 50
5.5.1 Fixed Volume Mixing Tank . . . . . . . . . . . . . . . . . . . . . . . 505.5.2 Heater Tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.5.3 Some General Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 53
6 Modelling of Systems with Chemical Equilibrium 546.1 Systems of High Index DAEs in Chemical Equilibrium . . . . . . . . . . . . 546.2 Example of Index Reduction in Chemical Equilibrium . . . . . . . . . . . . 566.3 Index Reduction for Isothermal Chemical Equilibrium Systems . . . . . . . 576.4 Index Reduction for Non-Isothermal Chemical Equilibrium Systems . . . . 60
7 Lumped Processes Involving Phase Equilibrium 627.1 Modelling of a Two-Phase Flash Unit . . . . . . . . . . . . . . . . . . . . . 62
7.1.1 Basic Model Derivation . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.1.2 Alternative Model Derivation . . . . . . . . . . . . . . . . . . . . . . 647.1.3 Physical Property Simplifications . . . . . . . . . . . . . . . . . . . . 657.2 Modelling of Two-Phase Reactors . . . . . . . . . . . . . . . . . . . . . . . . 667.3 Modelling of Phase Transitions in Two-Phase Systems . . . . . . . . . . . . 66
-
7/23/2019 Imperial Business timeteable
4/130
iii
8 Dynamics of Distillation Columns 698.1 Dynamic Behaviour of a Tray . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.1.1 Basic Model Development . . . . . . . . . . . . . . . . . . . . . . . . 698.1.2 Modelling of Tray Hydraulics . . . . . . . . . . . . . . . . . . . . . . 728.1.3 Additional Features of Tray Models . . . . . . . . . . . . . . . . . . 73
8.1.3.1 External Material and Energy Inputs/Outputs . . . . . . . 738.1.3.2 Entrainment and Weeping . . . . . . . . . . . . . . . . . . 748.1.3.3 Chemical Reaction . . . . . . . . . . . . . . . . . . . . . . . 758.1.3.4 Deviations from Phase Equilibrium . . . . . . . . . . . . . 75
8.2 Dynamic Behaviour of the Column Reboiler . . . . . . . . . . . . . . . . . . 758.3 Dynamic Behaviour of the Column Overheads . . . . . . . . . . . . . . . . . 76
8.3.1 Condenser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768.3.2 Reflux Drum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.4 Overall Column Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
9 Modelling of Distributed Systems 809.1 Isothermal Flow in a Horizontal Tube . . . . . . . . . . . . . . . . . . . . . 809.2 Non-isothermal Flow in a Horizontal Tube . . . . . . . . . . . . . . . . . . . 819.3 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829.4 Initial Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849.5 Modelling of Distributed Systems in Potential Fields . . . . . . . . . . . . . 84
9.5.1 Potential Energy and Forces . . . . . . . . . . . . . . . . . . . . . . . 84
9.5.2 Model Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . 859.6 Simplifications of the Momentum Balance Equation . . . . . . . . . . . . . 869.7 Multicomponent Distributed Systems . . . . . . . . . . . . . . . . . . . . . . 879.8 Multicomponent Reactive Distributed Systems . . . . . . . . . . . . . . . . 88
10 Numerical Methods for the Solution of PDAE Systems 8910.1 I ntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.1.1 A Class of PDAE Systems . . . . . . . . . . . . . . . . . . . . . . . . 8910.1.2 Other Forms of PDAE Systems . . . . . . . . . . . . . . . . . . . . . 8910.1.3 Initial Conditions for PDAE Systems . . . . . . . . . . . . . . . . . . 90
10.2 The Method of Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.3 Finite Difference Discretisation Methods . . . . . . . . . . . . . . . . . . . . 9210.4 Polynomial Approximation Methods . . . . . . . . . . . . . . . . . . . . . . 9410.5 Orthogonal Collocation on Finite Elements . . . . . . . . . . . . . . . . . . 97
11 Dynamic Modelling of Multiphase Distributed Systems 10011.1 Modelling Solid/Fluid Systems with Intraparticle Variations . . . . . . . . . 103
12 Optimisation of Transient Processes 10512.1 Semi-Batch Reactor Optimisation . . . . . . . . . . . . . . . . . . . . . . . . 105
12.1.1 Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10612.1.2 Input and Initial Condition Specifications . . . . . . . . . . . . . . . 107
12.1.3 Operating Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 10712.1.4 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10812.1.5 Optimisation Decision Variables . . . . . . . . . . . . . . . . . . . . 109
12.2 Switching between Steady States of Continuous Processes . . . . . . . . . . 110
-
7/23/2019 Imperial Business timeteable
5/130
iv
12.2.1 Dynamic Model of a Multi-Feed CSTR . . . . . . . . . . . . . . . . . 11012.2.2 Input and Initial Condition Specifications . . . . . . . . . . . . . . . 11112.2.3 Operating Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 11212.2.4 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11312.2.5 Optimisation Decision Variables . . . . . . . . . . . . . . . . . . . . 113
12.3 Mathematical Statement of the Dynamic Optimisation Problem . . . . . . . 11412.3.1 System Model and Initial Conditions . . . . . . . . . . . . . . . . . . 11412.3.2 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11512.3.3 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11512.3.4 The Optimisation Problem . . . . . . . . . . . . . . . . . . . . . . . 116
12.4 Solution Methods for Dynamic Optimisation Problems . . . . . . . . . . . . 116
12.4.1 Parameterisation of the Control Variables . . . . . . . . . . . . . . . 11612.4.2 The Optimisation Procedure . . . . . . . . . . . . . . . . . . . . . . 11812.4.3 Handling of Inequality Path Constraints . . . . . . . . . . . . . . . . 119
A Determination of Null Vectors of a Matrix 122
-
7/23/2019 Imperial Business timeteable
6/130
List of Figures
2.1 Buffer tank with single component material . . . . . . . . . . . . . . . . . . 6
2.2 Buffer tank with multicomponent material . . . . . . . . . . . . . . . . . . . 72.3 Reversible and symmetric discontinuity . . . . . . . . . . . . . . . . . . . . 112.4 Flow regime discontinuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5 Liquid-phase system with heater . . . . . . . . . . . . . . . . . . . . . . . . 132.6 Simple gas storage tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.7 Simple gas storage tank with safety relief valve . . . . . . . . . . . . . . . . 192.8 Reversible asymmetric discontinuity . . . . . . . . . . . . . . . . . . . . . . 192.9 Simple gas storage tank with bursting disk . . . . . . . . . . . . . . . . . . . 202.10 Irreversible discontinuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1 Newtons method for the solution ofF(z) = 0 . . . . . . . . . . . . . . . . . 24
3.2 Time discretisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.3 Linear multistep integration methods . . . . . . . . . . . . . . . . . . . . . . 263.4 Example of a linear multistep method . . . . . . . . . . . . . . . . . . . . . 273.5 Discontinuities in DAE systems . . . . . . . . . . . . . . . . . . . . . . . . . 293.6 Discontinuity detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.7 Discontinuity location (time axis not to scale) . . . . . . . . . . . . . . . . . 313.8 Discontinuities in a mechanical system . . . . . . . . . . . . . . . . . . . . . 323.9 Buffer tank with discontinuous input . . . . . . . . . . . . . . . . . . . . . . 34
4.1 Variable and constant volume CSTRs . . . . . . . . . . . . . . . . . . . . . 374.2 Variable volume CSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.3 Constant volume CSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.1 Constant volume mixing tank . . . . . . . . . . . . . . . . . . . . . . . . . . 505.2 Heater tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.1 Constant volume equilibrium reactor . . . . . . . . . . . . . . . . . . . . . . 546.2 Constant volume non-isothermal equilibrium reactor . . . . . . . . . . . . . 60
7.1 Two-phase flash unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.2 Phase transitions in a two-phase system . . . . . . . . . . . . . . . . . . . . 68
8.1 Staged distillation column . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.2 Detail of distillation column tray . . . . . . . . . . . . . . . . . . . . . . . . 708.3 Distillation tray schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.4 Details of tray geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728.5 Schematic of tray with external mass and energy inputs/outputs . . . . . . 74
v
-
7/23/2019 Imperial Business timeteable
7/130
vi
8.6 Distillation column reboiler schematic . . . . . . . . . . . . . . . . . . . . . 768.7 Distillation column overheads schematic . . . . . . . . . . . . . . . . . . . . 77
9.1 Empty horizontal tube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809.2 Tube geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849.3 Tube inclined at an angle from the horizontal . . . . . . . . . . . . . . . . 85
10.1 Grid on spatial domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9010.2 Schematic overview of Method of Lines . . . . . . . . . . . . . . . . . . . . . 9110.3 A combined lumped-distributed process . . . . . . . . . . . . . . . . . . . . 9110.4 Uniform grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.5 Orthogonal collocation on finite elements . . . . . . . . . . . . . . . . . . . 97
11.1 A solid-fluid system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10011.2 Solid/fluid systems with intrapartide variations . . . . . . . . . . . . . . . . 103
12.1 Semi-batch reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10612.2 Continuous stirred tank reactor with multiple feeds . . . . . . . . . . . . . . 11012.3 Switching between steady states . . . . . . . . . . . . . . . . . . . . . . . . 11212.4 Some simple control variable parameterisations . . . . . . . . . . . . . . . . 11712.5 Computational scheme for solution of dynamic optimisation problems . . . 12012.6 Transformation of inequality path constraint to end-point constraint . . . . 121
-
7/23/2019 Imperial Business timeteable
8/130
Chapter 1
Introduction
1.1 The Need for Dynamic Process Modelling
This course is concerned with the mathematical modelling of the transient behaviour ofchemical processes. This is a subject of great importance in many practical applications inprocess design and operations. These include:
The study of the operability and controllability of continuous processes operating ata nominal steady-state when they are subjected to relatively small external distur-bances.
The development of start-up and shut-down procedures for continuous processes. The study of switching continuous processes from one steady-state operating point to
another.
The analysis of the safety of processes when they are subjected to large disturbances(e.g. failure of equipment).
The study of the design and operating procedures for intrinsically dynamic processes,such as batch operations and periodic reaction and/or separation processes.
1.2 Process Classifications
In studying chemical processes, it is customary to introduce various classifications as anaid to the systematisation of their analysis and design. We consider two types of suchclassifications below.
1.2.1 Batch vs. Continuous Operations
A common classification is that of batch and continuous operations. In the former case,the feedstocks for each processing step (e.g. reaction, distillation etc.) are charged into thecorresponding equipment item at the start of processing while the products are removed
from the equipment at the end of processing. The transfer of material from an item ofequipment corresponding to one processing step to that corresponding to the next occursdiscontinuously, often via intermediate storage tanks that are used to mix or split batches,or to hold a batch from an upstream unit until the downstream unit becomes available.
1
-
7/23/2019 Imperial Business timeteable
9/130
INTRODUCTION 2
Clearly, batch processes are intrinsically dynamic with the conditions inside the processingequipment varying over the duration of the batch.
On the other hand, continuous processes involve continuous flows of material from oneprocessing equipment item to the next, and are usually designed to operate at steady state.However, because of the influence of external disturbances and/or deliberate control actions,in practice, even continuous processes operate in the transient regime.
There are also several variations of the two classes. For instance, it is possible for oneor more feedstocks to an (otherwise) batch unit operation to be added duringthe batch,leading to the so-called semi-batch (or, fed-batch) operation. Also, it is possible for someof the products of the operation to be removed during the batch; this is sometimes calledsemi-continuous operation. However, in all cases, the operation remains in the transient
regime in fact, the rates of feed addition or product removal are not normally constantover the duration of the batch.
An increasingly important sub-class of continuous processes is that ofperiodicprocesses.These are essentially continuous processes which are subjected to a periodic (e.g.sinusoidalor square wave) variation of one or more of their material and/or energy input streamsat a fixed frequency. After an initial period, these processes normally enter a periodicsteady-stateregime in which the conditions inside the processing equipment also vary in aregular periodic manner, usually at the same frequency as the external periodic excitation.Industrially important examples of such processes include:
Periodic adsorption processes.Here, the periodic variation of operating conditions (such as pressure and/or temper-ature) regulates the preferential adsorption and desorption of different species overdifferent parts of the cycle, thereby effecting the required separation.
Periodic homogeneous and heterogeneous reaction processes.The most common case involves the periodic variation of feed composition. Undercertain conditions, it can be shown that the average performance of the reactor over acycle at the periodic steady-state is superior to that which could be attained keepingthe feed composition constant at the same mean value.
Despite the apparent differences between the two main classes of processes and alsotheir various sub-classes, their treatment in this course will be very similar. As we shall
see, the mathematical description of dynamic process behaviour is largely independent ofthe precise form of the temporal variation of the process inputs.
1.2.2 Lumped vs. Distributed Operations
In all processes of interest to this course, the operating conditions (e.g. temperature, pres-sure, composition) inside the process equipment will be varying over time. Moreover, someof these equipment items will be operating under conditions of (almost) perfect mixing.This means that, at any particular time instant, the values of the operating conditions ofinterest are (approximately) the same at all points within the equipment. These are theso-called lumpedoperations.
On the other hand, imperfect mixing within a certain equipment item will typicallyresult in different operating conditions prevailing at different points even at the same time.The existence of distributions of conditions over spatial domains (rather than single values)within the equipment is the key characteristic ofdistributed operations.
-
7/23/2019 Imperial Business timeteable
10/130
INTRODUCTION 3
Some operations of key industrial interest involve distributions with respect to variablesother than spatial position. For instance, crystallisation operations do not normally gen-erate crystals of a single size and shape; rather, they produce distributions of crystal sizesand shapes, and these are very important in determining the quality of the product. An-other example is polymerisation reactions which produce polymers involving distributionsof molecular weight, degree of branching etc.
From the point of view of mathematical modelling, lumped and distributed operationsare quite different. The former are characterised by a single independent variable, namelytime, and therefore their modelling can be effected in terms of ordinary differential equa-tions. On the other hand, distributed operations introduce additional independent variablessuch as one or more spatial position co-ordinates, particle size and shape, molecular weight
and so on. Therefore, the modelling of distributed operations involves partial differentialequations in time and one or more other independent variables. In some cases, integralterms also need to be introduced to describe certain phenomena (e.g. agglomeration incrystallisation processes).
It is worth noting that the classification of processes into lumped and distributedis, to a certain extent, a consideration that pertains more to their modelling rather thanto their actual operation. In practice, no process operates under conditions of completelyperfect mixing, and spatial variations are always present. Whether or not these variationsare taken into account is a matter of judgement for the modeller who will have to considerthe objectives of the model being constructed, the required predictive accuracy and theavailable information. Thus, processes that may be adequately described as lumped for
one type of modelling application, may have to be treated as distributed for another. Ingeneral, as we seek to achieve higher predictive accuracy, we are increasingly forced to modelspatial variations. For example, imperfect mixing may have little effect on the conversionof reactants to the desirable product; hence, a lumped model could adequately predict themain aspects of the performance of the process. On the other hand, local compositionvariations may have a large effect on various side-reactions that lead to the generationof undesirable pollutants. Thus, a distributed model may be necessary for assessing theenvironmental impact of the process.
1.3 Conservation Laws
Mathematical process modelling involves the encoding of the physical behaviour of theprocess as a set of mathematical relations. This task involves the application of fundamentalphysical laws. Of particular interest to this course are the so-calledconservation laws. Theselaws consider a subset of the universe as thesystemof interest; the position of the boundaryseparating the system and its surroundings(the environment) may vary over time.
1.3.1 General Form of Conservation Laws
The aim of a conservation law is to describe the variation of the amount of a conservedquantity within the system over time. In fact, all conservation laws have the same general
-
7/23/2019 Imperial Business timeteable
11/130
INTRODUCTION 4
form:
Rate ofAccumulationof Conserved
QuantityWithin System
=
Rate ofFlow
of ConservedQuantity
Into System
Rate ofFlow
of ConservedQuantity
From System
+
Rate ofGeneration
of ConservedQuantity
Within System
(1.1)Typical conserved quantities considered in practical applications include:
total mass (measured in kg)
mass of individual species (measured in kg) number of molecules and/or atoms (the so-called amount of substance, measured
in mol)
energy (measured in J) momentum (measured in kg.m/s) electric charge (measured in C) number of particles of solid.
1.3.2 Are Conserved Quantities Really Conserved ?
An interesting aspect of the general equation (1.1) is the existence of the generation termon the right hand side. Clearly, a quantity that can be generated or consumed cannot bestrictly conserved as the term conservation law might seem to imply!
What conservation laws actually do is to provide a simple and systematic accountingbasis (a balance) for different types of quantities and their inter-conversions. Thus, onecould argue that there is nothing special about formulating conservation laws for certainquantities rather than others - if one allows the possible existence for a generation term,then a conservation law may be written for anyphysical quantity1.
The usefulness of a particular law primarily depends on whether or not we possess the
necessary physical knowledge to quantify each and every term that appears in it andin particular, the generation one. For example, a conservation law for entropy may be oflimited utility since we cannot easily express the rate of generation of entropy in termsof the conditions in the system. On the other hand, a conservation law for a particularchemical species may be useful even if this particular species is not actually conserved, beingconverted to other species via one or more chemical reactions provided we can characterisethe rate of each of these reactions in terms of functions of the composition, temperature,and pressure in the reactor.
Another pertinent consideration in the context of conservation laws is that often therate of generation of one quantity is related to the rate of generation (or consumption) ofanother. This affects the quantities to which a conservation law may usefully be applied.
For instance, consider a system in which the single chemical reaction:A B
1And some non-physical ones too: for example, in his 1991 novel The Quantity Theory of Insanity,Will Self postulates a conservation law for lunacy in the universe!
-
7/23/2019 Imperial Business timeteable
12/130
INTRODUCTION 5
takes place. In this case, the rate of generation of speciesB is equal to the rate of consump-tion of species A. If it were not possible or easy to characterise the rate of this reaction,a conservation law on the amount of A (or B) in the system would not be very useful.However, it may still be useful to formulate a conservation law on the combinedamount ofAand B as this would not involve any generation term.
Another example is that of mass and energy variations in the presence of nuclear reac-tions. Although these two quantities are not individually conserved, they can be combinedto formulate a conservation law that does not involve the rate of the nuclear reactions.
We will re-visit these ideas in Chapter 6 where we will show that certain mathematicaldifficulties that are closely related to the rates of equilibrium chemical reactions can beremoved by appropriate choice of the conserved quantities.
-
7/23/2019 Imperial Business timeteable
13/130
Chapter 2
Non-Reacting Lumped Systems
2.1 Introduction
This chapter is concerned with the modelling of what might be considered the simplest typeof processes, namely those that do not involve either spatial variation of properties or anychemical reaction. Despite their simplicity, these processes will allow us to introduce anddiscuss some important concepts and issues that occur throughout this course.
2.2 Systems Involving Mass Balances Only
2.2.1 Single Component Material in a Buffer Tank
We start by considering a simple buffer tank with a single input stream and a single outputstream (see figure 2.1). The material in this system involves just a single component.
Here we consider the contents of the tank as our system. Note that the boundaries of thissystem move with time as the tank is open to the atmosphere. Applying the conservationlaw (1.1) to the mass of material in the system, we obtain the equation:
F (kg/s)in
TM (kg)
F (kg/s)out
Figure 2.1: Buffer tank with single component material
6
-
7/23/2019 Imperial Business timeteable
14/130
NON-REACTING LUMPED SYSTEMS 7
M , i=1,..,ci
in i, in
out i, out
F , x
F , x
Figure 2.2: Buffer tank with multicomponent material
Rate ofAccumulation
of MassWithin Tank
=
Rate ofFlow
of MassInto Tank
Rate ofFlow
of MassFrom Tank
+
Rate ofGeneration
of MassWithin Tank
dMTdt
= Fin Fout + 0(2.1)
whereMT(t) is the total mass of material in the tank at time t, andFin(t) andFout(t) arethe flowrates of the inlet and outlet stream respectively. Note that, in the absence of anynuclear reaction, the generation term is zero.
2.2.2 Multicomponent Material in a Buffer Tank
This example is identical to that considered in section 2.2.1 except that now the materialcomprisesc distinct components (see figure 2.2). Of course, irrespective of the number ofcomponents, the conservation law applied to the total mass of material in the system willyield the same equation as before:
dMTdt
=Fin Fout (2.2)We now apply the conservation law to the mass of component i in the system. This
yields thec component mass balance equations:
dMidt
=Finxi,in Foutxi,out , i= 1, . . ,c (2.3)
where Mi represents the amount of component i in the tank at time t, and xiin and xi,outare the mass fractions of componenti in the inlet and outlet streams respectively. Note thezero generation term on the right hand side of the above equation signifying the absence ofany chemical reactions.
The total holdupMTis related to the component holdups Mi via the equation:
MT =c
i=1
Mi (2.4)
-
7/23/2019 Imperial Business timeteable
15/130
NON-REACTING LUMPED SYSTEMS 8
while the composition in the tank, expressed in terms of the mass fractions x i, i = 1, . . ,cisgiven by:
xi = Mi/MT , i= 1, . . ,c (2.5)
2.2.2.1 The Perfect Mixing Assumption
So far, we have not actually made use of the fact that this is a lumped system ( cf. section1.2.2). Thus, equations (2.2)-(2.4) would be correct irrespective of whether the tank contentsare perfectly mixed or not. Equation (2.5) is also generally correct providedx iis interpretedas the meanmass fraction of component i in the tank. However, to make further progress,we need to be able to relate the composition of the outlet stream (i.e. the mass fractions
xi,out) to the operating conditions inside the tank. One implication of the lumped systemapproximation and the perfect mixing assumption inherent in it is that:
IMPLICATIONS OF THE PERFECT MIXING ASSUMPTION
All intensive properties of the stream(s) leaving a perfectly mixed systemare identical to those inside the system.
In this particular example, the above means that:
xi,out= xi , i= 1, . . ,c (2.6)
2.2.2.2 Redundancy of the Total Mass Balance Equation
The total mass balance equation (2.2) is redundant with respect to equations (2.3)-(2.6).To see this, we sum all equations (2.3) for i= 1, . . ,c, making use of (2.6) to replace xi,outbyxi:
ci=1
dMidt
=c
i=1
(Finxi,in Foutxi)
which, by virtue of (2.4) and (2.5), simplifies to:
d(MT)
dt
=Fin
c
i=1
xi,in
Fout
Now, assuming that the inlet stream mass fractions add up to unity, the above reduces tothe total mass balance (2.2) which is, therefore, not an independent equation.
2.2.2.3 Mass Balance Equations in Terms of Mass Fractions
It is possible to replace the differential equations (2.3) by other equations expressed in termsof the mass fractions x i. This is easily achieved by replacing Mi byxiMT:
d
dt(xiMT) =Finxi,in Foutxi , i= 1, . . ,c
Expanding the time derivative on the left hand side, and making use of (2.2) to replacedMT/dtby Fin Fout, we obtain the desired equations:
MTdxidt
=Fin(xi,in xi) , i= 1, . . ,c (2.7)
-
7/23/2019 Imperial Business timeteable
16/130
NON-REACTING LUMPED SYSTEMS 9
Viewed as a simple set of ordinary differential equations, the above is somewhat prob-lematic in that the variables x i cannot all be given arbitrary initial values since they haveto add up to unity (cf. equations (2.4) and (2.5)). However, if the initial valuesdo satisfythis condition, then all subsequent values obtained by solving (2.2) and (2.7) as a set ofc + 1 simultaneous differential equations will also satisfy it. This can be seen by summingequations (2.7) over all components i. Following some simple algebraic manipulation andtaking account of the fact that
ci=1 xi,in= 1, we obtain:
MTd
dt
ci=1
xi
= Fin(1
ci=1
xi)
or:
MTdS
dt =Fin(1 S)
where we define Sci=1 xi. We can see that, ifS(0) = 1, then dS/dt = 0 and thereforeS(t) remains 1 for all times t. In fact, even ifS(0)= 1, the above equation indicates thatS(t) will tend asymptotically towards unity with a time constant ofMT/Fin.
2.2.2.4 Formulation of the Accumulation Terms in Conservation Laws
In general, accumulation terms on the left hand side of conservation laws may be formulatedin terms of either extensivevariables (such as Mi in equation (2.3)) or intensiveones (such
as xi in equation (2.7)). The above discussion on our simple buffer tank example wouldseem to indicate that these two ways of formulating the accumulation term are completelyequivalent. However, whilst this is true from the strictly mathematical point of view, itis not generally the case from the point of view of either the ease of formulation of themodel equations or the numerical solution of the latter. For non-trivial models, we stronglyrecommend the following:
ACCUMULATION TERMS IN CONSERVATION LAWS
The accumulation term in a conservation law should be formulated interms of a single extensive variable representing:
the total amount of the conserved quantity in the system (in thecase of lumped systems), or,
the amount of the conserved quantity per unit volume (in the caseof distributed systems).
If necessary, additional algebraicrelations should be introduced to ex-press the relationships between the extensive variables used above andthe intensive properties of the system (as, for instance, in equations(2.4) and (2.5)).
2.2.3 Model Completeness and Degrees of Freedom
One key question in building a mathematical model is that of completeness: suppose thatwe are given a certain set of independent equations that purport to describe the transient
-
7/23/2019 Imperial Business timeteable
17/130
NON-REACTING LUMPED SYSTEMS 10
behaviour of a process; how do we then decide whether this set is, in some sense, complete, orwhether it needs to be augmented by additional equations encoding some physical knowledgethat is not already embedded in the existing equations ?
The above question is equivalent to asking whether the available equations determineunique time trajectories for all variables of interest to the modeller. These variables do notnecessarily compriseallof the variables occurring in the system of equations1. Nevertheless,in most of this course, we will employ a somewhat simplified completeness criterion thatcan be expressed as follows:
MODEL COMPLETENESSA dynamic model of a process will be deemed to be complete if, given the
time variation of all extensive and intensive properties associated with theprocess inlets it can determine unique time trajectories for all the othervariables occurring in it.
Let us now try and apply the above criterion to our model of the multicomponent buffertank. The set of equations (2.3)-(2.6) comprises 3c+1 independent equations in 4c+ 3 time-varying variables, namely (Mi(t), xi,in(t), xi(t), xi,out(t), i= 1, . . ,c) and MT(t), Fin(t), Fout(t).If we assume that the (c+1) variablesFin(t) andxi,in(t), i= 1, . . ,cassociated with the inletstream are known functions of time, we are left with 3c+ 2 unknowns. We therefore needone additional equation or specification. In common chemical engineering terminology, wehave one degree-of-freedom:
Number ofDegrees
of Freedom
=
Number ofModel
Variables(Excluding Inputs)
Number ofModel
IndependentEquations
(2.8)
2.2.4 Characterisation of the Outlet Flowrate and Discontinuities
We note that our buffer tank model does not yet incorporate any physical knowledge regard-ing the mechanisms that cause material to leave the system. In fact, most dynamic processmodels of practical interest are likely to include a description of some such mechanism. Inthe particular example considered here, we need to characterise the flowrate Fout(t) of the
outlet stream, thereby providing the missing piece of information.Depending on the geometry of our equipment and the degree of physical realism that we
wish to introduce, the characterisation ofFout may involve several steps. Here, we assumethat the buffer tank has a uniform cylindrical cross-section of area S, with the outlet pipebeing situated at a height l from the bottom of the tank.
1. First, we have to recognise that whether or not we have outflow depends on the levelof the liquid in the tank relative to the position of the outlet pipe. If the level l of theliquid in the tank is below the levell of the outlet pipe, then no flow takes place. Onthe other hand, ifl > l, then some of the liquid may leave the tank.
Clearly, the outlet flowrate is determined by equations of different form depending on
the conditions in the tank (in this case, the height of liquid). This is an example of
1After all, some of the models that are currently employed in industrial practice involve tens of thousandsof variables, yet their usefulness consists in being able to predict a handful of quantities directly related tothe economic performance, the product quality and the safety and environmental impact of the process.
-
7/23/2019 Imperial Business timeteable
18/130
NON-REACTING LUMPED SYSTEMS 11
No Outflow Outflow
F = 0out
F = F (M,...)out out
l < l
l > l *
*
l l*
Figure 2.3: Reversible and symmetric discontinuity
a discontinuousequation which can be represented using a State-Transition Network(STN) as shown in figure 2.3. Here we have two distinct states (shown as ellipsesin the diagram) labelled as Outflow and No Outflow; each state involves adifferent equation (or set of equations). At any particular time during its operation,the process can be in exactly one of these states. However, under certain conditions,a transition may occur from one state to another; transitions are shown as arrows inthe diagram and are labelled with the logical condition that would trigger them.
The STN of figure 2.3 involves a transition that goes from state Outflow to NoOutflow and another one that goes in the reverse direction; this is, therefore, anexample of areversiblediscontinuity. Moreover, the logical conditions associated with
the two transitions are the negation of each other, hence this discontinuity is also saidto be symmetric.
2. The level l of liquid in the tank is related to M via:
M=Sl (2.9)
where S is the cross-sectional area of the tank and is the density of the liquidmaterial. The latter will, in general, depend on the composition 2:
= (x) (2.10)
e.g., for an ideal mixture:1
=
ci=1
xioi
whereoi denotes the density of pure component i.
3. The actual outlet flowrate in the Outflowstate depends on the precise mechanismthat causes this outflow, e.g.:
If a positive displacement pump is used to remove material from the tank, Fout=constant.
If the outlet pipe discharges to the atmosphere, then the flow is driven by gravity.
The pressure drop across the pipe will equal the hydrostatic pressure due to the
2To a lesser extent, density also depends on temperature and pressure but, for the moment, we assumethat both of these are constant.
-
7/23/2019 Imperial Business timeteable
19/130
NON-REACTING LUMPED SYSTEMS 12
Laminar Turbulent
f = 16 / Re
Re > 2100
Re < 2100
Colebrook Correlation
Figure 2.4: Flow regime discontinuity
liquid in the tank above the entrance of the pipe:
P =g(l l) = 4f Lv22D
(2.11)
whereD is the diameter of the pipe, fthe Fanning friction factor and the outputflowrate is given by:
Fout =D2
4 v (2.12)
4. The Fanning friction factor, f, depends on the flow regime. For laminar flow, it isgiven by:
f= 16
Re (2.13)
For turbulent flow, we have empirical formulae like the Colebrook correlation:1f
= 4log10
1.26
Re
f +
/D
3.7
(2.14)
where is the pipe wall roughness. Assuming that the transition from the laminarto the turbulent regime occurs at the same value ofRe as the reverse transition, wehave a reversible and symmetric discontinuity, as illustrated in figure 2.4.
5. The Reynolds number Re is defined by:
Re= vD
(2.15)
where the viscosity, , is a function of composition:
= (x) (2.16)
2.3 Systems Involving Mass and Energy Balances
The examples considered so far did not attempt to model the variation of the temperaturein the system. Of course, temperature is a key factor that affects the performance andsafety of most processes. Its characterisation involves the consideration of energy dynamicsusing the law of conservation of energy.
2.3.1 Simple Liquid-phase System with Heater
This example considers a multicomponent buffer tank similar to that studied in section2.2.2 but fitted with a heating device (see figure 2.5).
-
7/23/2019 Imperial Business timeteable
20/130
NON-REACTING LUMPED SYSTEMS 13
Q
F , x , h
F , x , hout i, out out
i, inin in
iM , Hi
Figure 2.5: Liquid-phase system with heater
2.3.1.1 General Form of the Energy Conservation Law
The mass dynamics of the system are represented by exactly the same equations as before.The additional element that we wish to study here is that of energy dynamics. In particular,the energy conservation law applied to a system comprising the tank contents can be writtenas:
ddt
TotalInternalEnergy
+Total
KineticEnergy
+Total
PotentialEnergy
=
=Fin
hin+
SpecificInlet Stream
KineticEnergy
+
SpecificInlet Stream
PotentialEnergy
+ Q +
Rate of WorkCarried out on
Systemby Surroundings
Fout
hout+
SpecificOutlet Stream
KineticEnergy
+
SpecificOutlet Stream
PotentialEnergy
Heat Lossesto
Tank Metaland Surroundings
(2.17)
Several important points may be noted in conjunction with the above equation:
1. The accumulation term on the left hand side of the energy conservation law needs totake account ofal lthe different forms in which energy may be held. In this particularcase, these forms include:
internal energy representing the energy held by the random movement of themolecules and atoms of the fluid, and by the intermolecular/interatomic forces;
kinetic energyrepresenting the bulk motion of the liquid in the tank ( e.g.causedby the external agitation);
potential energythat the fluid possesses by virtue of its position in a gravitationalforce field.2. The inlet and outlet streams make similar contributions that are proportional to the
flowrate of each stream. Note that specificenthalpy(rather than internal energy) is
-
7/23/2019 Imperial Business timeteable
21/130
NON-REACTING LUMPED SYSTEMS 14
used to represent the energy held by the molecules and atoms in these streams. In thecase of the inlet stream, the difference between specific enthalpy and specific internalenergy accounts for the additional energy (work) required to force an element of fluidin the inlet stream into the fluid in the system. A similar consideration applies forthe outlet stream.
3. The external heat input Q and the loss of heat to the metal of the tank and thesurroundings provide additional input and output terms respectively.
4. In addition to heat inputs, one has to take account of any mechanical work that thesurroundings perform on this system. In this case, there are at least two contributions.
The first one is due to the mechanical agitation device; the corresponding rate ofenergy addition would normally be equal to the power output of the device3.
The second mechanical work term arises from the fact that the tank is open to theatmosphere. Thus, the boundary of the system under consideration (i.e. the liquidsurface) may move up and/or down during the operation, and this motion occursagainst the force exerted on the liquid surface by the atmosphere. The rate at whichwork is imparted to the system is given by PatmdV/dtwherePatmis the atmosphericpressure andV is the volume of liquid in the tank. We note that, as we might expect,this work term is positive if the liquid level moves downwards (in which case, theatmosphere is carrying out work on the system) and negative otherwise (in whichcase, the system is pushing back the atmosphere).
2.3.1.2 Simplified Form of the Energy Conservation Law
Ignoring all kinetic and potential energy terms in equation (2.17) as well as heat losses andagitator power contributions, the energy conservation law simplifies to:
dU
dt =Finhin+ Q Patm dV
dt Fouthout
where U is the total internal energy holdup in the system. Assuming that the tank iswell-stirred, hout h. Moreover, bringing the work term to the left hand side, we obtain:
dU
dt + Patm
dV
dt =Finhin+ Q FouthAs Patm is approximately constant, the left hand side can be written as
ddt
(U +PatmV).Assuming that the pressure variations within the tank are small, we can approximate PPatm and therefore the left hand side becomesdH/dt whereH is the total enthalpy holdupin the system. Thus, the energy conservation equation reduces to:
dH
dt =Finhin+ Q Fouth (2.18)
The total enthalpy holdup is related to the specific enthalpy via:
H=MTh (2.19)
3Depending on the design of the tank and its ancillary mixing equipment, there may also be an additionalinput of heat dissipated by the motor of the agitator. In this case, it would be easier to combine the ratesof mechanical and heat input into a single term equal to the power consumption(rather than output) of theagitator.
-
7/23/2019 Imperial Business timeteable
22/130
NON-REACTING LUMPED SYSTEMS 15
The above equations essentially determine how the (specific) system enthalpy varieswith time. The system temperature T is related to this enthalpy via the thermophysicalproperty relation:
h= h(T , P , x) (2.20)
Notes
1. Normally, we assume that the inlet stream conditions (Fin, xi,in, hin) will be de-termined by upstream operations (cf. section 2.2.3). We do not, therefore, includeequations for the determination ofh in in our model.
2. In addition to the equations and variables that determine the mass dynamics of the
tank (cf. section 2.2.2), our model comprises 3 equations (i.e. equations (2.18)-(2.20)in 5 variables, namelyH,h,Q,T andP. Assuming thatP Patm, we need one moreequation or specification. This will typically be related to the heat inputQ which willbe determined by the mechanism used for the external heat supply; for example:
Electrical heating coil: Q is a given function of time:Q= Q(t) (2.21)
Steam jacket: Qis determined by the heat transfer relation:Q= HA(Ts T) (2.22)
whereHdenotes the overall heat transfer coefficient, A is the heat transfer areaand Ts is the temperature of the condensing steam.
2.3.1.3 Assumptions and Simplifications in Process Modelling
By employing additional assumptions, it is possible to derive an explicit differential equationin the system temperature T. We start by assuming ideal mixture behaviour which impliesthat the specific enthalpy h is given by:
h=c
i=1
xihoi (T) (2.23)
where hoi (T) is the specific enthalpy of pure component i in the liquid phase. A similarequation can be obtained forhin. Also by multiplying (2.23) by the total mass holdup MTand making use of equations (2.19) and (2.5), we obtain:
H=c
i=1
Mihoi (T) (2.24)
Then from equation (2.18):
ci=1
Midhoidt
+c
i=1
dMidt
hoi (T) =Fin
ci=1
xi,inhoi (Tin) Fout
ci=1
xihoi (T) + Q
The first term on the left hand side of the above equation can be expressed in terms of thetime derivative of temperature by noting that:
dhoidt
= dhoi
dT dT
dt =Copi(T)
dT
dt
-
7/23/2019 Imperial Business timeteable
23/130
NON-REACTING LUMPED SYSTEMS 16
where Copi(T) is the specific heat capacity (under constant pressure) of pure component iat temperatureT, and defining a mixture specific heat capacity Cp as:
Cp =c
i=1
xiCopi
(T)
Using equation (2.3) to eliminate dMi/dt, we obtain:
M Cp(T, x)dT
dt =Fin
ci=1
xi,in(hoi (Tin) hoi (T)) + Q (2.25)
Moreover, if we assume that the pure component specific heat capacity, Co
pi are constantover the range of temperatures of interest, the enthalpy differences on the right hand sideabove can be expressed in terms of temperature differences, leading to:
M Cp(x)dT
dt =FinCp(xin)(Tin T) + Q (2.26)
Finally, if we assume that Copi is the same for all components (= Cp), we obtain theequation:
M CpdT
dt =FinCp(Tin T) + Q (2.27)
This equation is, in fact, very commonly used in engineering practice. However, it
is worth noting that it has been derived using a number of assumptions (ideal mixture,constant specific heat capacity...) that are both questionable and unnecessary: moderncomputer capabilities and the availability of methods for the accurate prediction of ther-mophysical properties imply that the model could well be used in its original form. Moregenerally, we believe that assumptions must be considered only when absolutely necessary:
ASSUMPTIONS IN PROCESS MODELSThe introduction of a certain assumption in process models should be con-sidered only when not introducingthe assumption would result in: A substantial increase in computational complexity.The perfect mixing assumption falls under this category: the study of im-
perfect mixing may necessitate the consideration of the 3-dimensional fluiddynamics of the system under conditions of turbulence, and the solution ofthe associated complex equations. The need to characterise phenomena which are not well understood and/orcannot easily be quantified.A typical assumption in this category is that of phase equilibrium. This caneasily be removed by introducing models based on finite rates of mass andheat transfer between the phases; however, the associated mass and heattransfer coefficients and interfacial areas cannot always be predicted withsufficient accuracy.
2.3.2 Simple Gas Storage TankThe previous example considered a liquid-phase system that was open to the atmosphere.Here, we study a gas-phase single-component system in a well-insulated fixed volume tank(see figure 2.6).
-
7/23/2019 Imperial Business timeteable
24/130
NON-REACTING LUMPED SYSTEMS 17
inF , h
inM
u
Volume, V
Figure 2.6: Simple gas storage tank
Defining our system as the gas contained in the tank, the basic modelling equations areas follows:
dM
dt =Fin (2.28)
dU
dt =Finhin (2.29)
U =M u (2.30)
u= uo
(T, P) (2.31)M =V (2.32)
= o(T, P) (2.33)
Note that the accumulation term in the energy balance equation (2.29) is expressed interms of the total internal energy holdup U, rather than the total enthalpy H as in themodel considered in section 2.3.1.2 (cf. equation (2.18)). This is because the boundariesof the system considered in this section do not move with time, and therefore there is noadditional work term that would be added to U to produceH.
Overall, the model comprises 6 equations in 6 unknowns (M, U, u, T, P, ). Now letus consider some common simplifications:
1. Assume ideal gas behaviour.
Then, equation (2.33) becomes:
o = P
RT
and, together with equation (2.32), yield (assuming all quantities are molar):
P V =M RT (2.34)
Also, equation (2.31) simplifies to
u= uo
(T) (2.35)
-
7/23/2019 Imperial Business timeteable
25/130
NON-REACTING LUMPED SYSTEMS 18
2. Assumeu h.Then from equations (2.29) and (2.30):
Mdh
dt =Fin(hin h)
and since h = ho(T) only,
M CpdT
dt =Fin(h
o(Tin) ho(T)) (2.36)
which together with equations (2.28) and (2.34) form a model comprising 3 equations
in M, T and P.
The new model is certainly much simpler than the original. Butdoes it actually predictthe correct transient behaviour for the tank ? Consider a system with constant Fin, Tin,with an initial temperatureT(0) =Tin. Then, according to equation (2.36),
dTdt
= 0 initially,
which implies that Twill stay constant at Tin, which will keep dTdt
= 0 and so on. So thepredicted behaviour is:
T(t) =Tin
Now, let us try to simplify the original model equation (2.29) but without assumingh u:
d(M u)
dt
=Finhin
Mdu
dt
=Fin(hin
u)
For an ideal gasdu
dt =Cv
dT
dt
and
u= h pv= h p
V
M
= h RT
Therefore:
M CvdT
dt =Fin(hin h) + FinRT
M CvdT
dt
=Fin[ho(Tin)
ho(T)] + FinRT (2.37)
Comparing equations (2.36) and (2.37), we note that equation (2.37) has Cv on the lefthand side as opposed to Cp in equation (2.36). More importantly, equation (2.37) has anextra positive term on the right hand side. Thus, even if we start from T(0) = Tin, thetemperature will rise! This is effectively the result of the work that the inlet stream performsin pushing material into the system (cf. comment 2 in section 2.3.1.1).
2.3.3 Gas Storage Tank with Safety Relief System
The model is very similar to that for the previous example, but with additional relief flowterms in the mass and energy balances:
dMdt
=Fin Fr (2.38)
dU
dt =Finhin Frh (2.39)
-
7/23/2019 Imperial Business timeteable
26/130
NON-REACTING LUMPED SYSTEMS 19
Fr
inF
Relief valve
Figure 2.7: Simple gas storage tank with safety relief valve
Valve Closed Valve Open
F = 0r
P > P
P < P
F = f(P,T)r
reseat
open
Figure 2.8: Reversible asymmetric discontinuity
where the contents of the tank are assumed to be well-mixed.The main issue is the characterisation of relief flowrate, Fr. In particular, the relief
valve can exist in two states, Open or Closed. In the Closed state, the flowrate Fris clearly zero. On the other hand, when the valve is in the Open state we probably havesonic flow through it, with the flowrate being some function ofP and T.
The transition from Closed to Open occurs when the pressure in the tank exceeds
some critical value, Popen. On the other hand, the reverse transition occurs at a lowerpressurePreseat due to the valve hysteresis. For instance, Popen = 10atm; Preseat = 9atm.Overall, this is an example of a reversible but asymmetric discontinuity.
Instead of a safety valve, we could have a bursting disk that allows a more rapid de-pressurisation of the vessel (see figure 2.9). The situation here can be depicted as shown infigure 2.10 and is an example of an irreversiblediscontinuity.
-
7/23/2019 Imperial Business timeteable
27/130
NON-REACTING LUMPED SYSTEMS 20
inF
Figure 2.9: Simple gas storage tank with bursting disk
P > Popen
F = 0r
F = f(P,T)r
Disk Intact Disk Burst
Figure 2.10: Irreversible discontinuity
-
7/23/2019 Imperial Business timeteable
28/130
Chapter 3
Systems of Differential and
Algebraic Equations
The traditional mathematical analysis and solution of dynamic systems is based on theassumption that they are described by sets of differential equations of the form:
x= f(x, u) (3.1)
where x dxdt andu(t) are given input variables. However, most process engineering modelsare different. For instance, the simple liquid-phase system with heater considered in section
2.3.1 yielded the model:
dMidt
=Finxi,in Foutxi , i= 1,..,c (3.2a)
ci=1
Mi = MT (3.2b)
xiMT =Mi , i= 1, . . ,c (3.2c)
dH
dt =Finhin+ Q Fouth (3.2d)
H=MTh (3.2e)h= h(T , P , x) (3.2f)
To complete this model (cf. section 2.2.3), let us assume additional equations of the form:
Q= HA(Ts T) (3.2g)
Fout= MT (3.2h)
characterising the external heat input and the outlet stream flowrate respectively in termsof simple heat transfer and gravity-driven flow relations.
This is a mixed system of differential and algebraic equations (DAEs) of the general
form:f(x, x,y,u) = 0 (3.3a)
g(x,y,u) = 0 (3.3b)
21
-
7/23/2019 Imperial Business timeteable
29/130
SYSTEMS OF DAEs 22
wherex are the differential variables (x dxdt ), y are the algebraic variables, anduare thesystems inputs (u(t) is given). We also have f as the differential equations and g as thealgebraic ones.
In the particular example considered above, we can identify:
x {(Mi, i= 1,..,c), H}
y {(xi, i= 1, . . ,c), MT, Fout,h,Q ,T}u {Fin, (xi,in, i= 1, . . ,c), hin, P , T s}
f {3.2a, 3.2d}g {3.2b, 3.2c, 3.2e, 3.2f , 3.2g, 3.2h}
Note thatH, A and are assumed to be parameters, the value of which is constant overtime and given.
Overall, then, we have (c+ 1) differential and (c+ 5) algebraic equations in (c+ 1)differential and (c + 5) algebraic variables. Usually,
Number ofDifferentialVariables
= Number ofDifferential
Equations
n
Number ofAlgebraicVariables
= Number ofAlgebraicEquations
m,which results in a total of (n + m) equations in (n+ m) unknowns.
Here, we are concerned with two major issues:
(a) How do we specify the initial condition of a DAE system att = 0 ?
(b) How do we solve a DAE system to obtain the variation of the variablesx(t), y(t) fort >0 ?
3.1 Initialisation of DAE Systems3.1.1 Initial Condition Specification
The initial (t= 0) condition of a DAE system is determined by the values of the following2n + m variables:
{x(0), x(0), y(0)}However, these cannot be specified arbitrarily. The model equations 3.3 represent ourunderstanding of how physics operate over time, so they should also hold at time t = 0.Therefore, we must have:
f(x(0), x(0), y(0), u(0)) = 0 (3.4a)
g(x(0), y(0), u(0)) = 0 (3.4b)
which is a set of (n+ m) equations in{x(0), x(0), y(0)} remember u(0) is given. Aconsistent initial condition must satisfy 3.4. Thus, 3.4 are necessary for consistency. For
-
7/23/2019 Imperial Business timeteable
30/130
SYSTEMS OF DAEs 23
the vast majority of models of practical interest, 3.4 are also sufficient1. We therefore havendegrees of freedom (n= (2n+m)(n+ m)),i.e. we have to impose anothern specificationson the initial conditions.
Before we go any further, let us apply the same analysis to the ODE system 3.1. Herem = 0, the initial condition is{x(0), x(0)} and for consistency we must have x(0) =f(x(0), u(0)), i.e. n equations in 2n unknowns, hence again n degrees of freedom. Ofcourse, the usual convention (especially for mathematicians!) is to specifyx(0) = x 0, butthere is no reason not to specify x(0), e.g. the very common steady state specification
x(0) = 0 (3.5)
or, indeed, some combination ofx(0) and x(0).Now, for DAEs, we usually have all the possibilities of the ODE case ( i.e. specifying
x(0) or x(0)), but also more involving the algebraic variablesy(0). Again, considering theexample problem, valid initial specifications include
{(Mi(0), i= 1, . . ,c), H(0)}M(0), (xi(0), i= 1,..,c 1), H(0)
{M(0), (xi(0), i= 2,..,c), T(0)}
{Fout(0), (xi(0), i= 2, . . ,c), Q(0)}each of which involves (c + 1) specifications. However, not all combinations of (c + 1)variables out of{x(0), x(0), y(0)} are valid. For instance,
{(xi(0), i= 1, . . ,c), T(0)}
is not: clearly, the c initial mass fractions xi(0) cannot be specified arbitrarily since theymust satisfy the normalisation relation implied by equations (3.2b) and (3.2c).
3.1.2 Consistent Initialisation
We can view the initial condition specifications as n additional equations imposed on the
system: h(x(0), x(0), y(0)) = 0 (3.6)
Of course, in most cases, these equations will be very simple, taking the form
Variable(0) = Value
In any case, we can combine 3.6 with 3.4 to form a system of (2 n+ m) equations in (2n+m)unknowns:
F(z) = 0 (3.7)
where the new sets of variables z and equations F() are defined as:
z x(0)x(0)
y(0)
, F() f()g()h()
1Systems in which this is nottrue are considered in Chapter 5.
-
7/23/2019 Imperial Business timeteable
31/130
SYSTEMS OF DAEs 24
Starting with an initial guess, z(0).1 Set k= 0.
2 Calculate F(z(k)) -- a vector of (2n+ m) values.
3 Calculate Fz (z(k)) -- a (2n+ m) (2n+ m) matrix.
4 Solve the set of (2n+ m) linear equations:
F
z(z(k))
p(k) = F(z(k)) (3.9)
for the step p(k).5 Get new estimate
z(k+1)
:=z(k)
+ p(k)
(3.10)where the parameter (0, 1].
6 If
F(z(k+1)) > , then set k := k + 1 and go to step 2.Otherwise, terminate.
Figure 3.1: Newtons method for the solution ofF(z) = 0
This will generally be nonlinearand therefore has to be solved numerically. We start withan initial guessz(0) and take a sequence of iterations forming (hopefully) increasingly betterestimatesz(1), z(2), . . . until we get a solution, i.e. a pointz at which
F(z) (3.8)whereis a norm(e.g. max
i|Fi(z)|) and is a small number (e.g. = 105).
The most common way of solving these equations is via Newtonsmethod or its variants.This is outlined in Figure 3.1.
3.2 Numerical Solution of DAE Systems
Having obtained a consistent initial condition{x(0), x(0), y(0)}, we now have to solve theDAE system 3.3 to determine x(t), x(t), y(t), t > 0. Because of the nonlinearity of thissystem, the solution has to be done numerically.
Unfortunately, numerical methods cannot determine x, x, y as continuous functions oftime t. They can only approximate their values at a set of discrete points tk as shown inFigure 3.2, where:
xkxkyk
x(tk)x(tk)
y(tk)
, k= 1, 2, 3, . . .
3.2.1 Simple Integration Formulae
At the very least, we would like the numerical solution at time tk to satisfy the modelequations. Therefore:
f(xk, xk, yk, u(tk)) = 0 (3.11a)
g(xk, yk, u(tk)) = 0 (3.11b)
-
7/23/2019 Imperial Business timeteable
32/130
SYSTEMS OF DAEs 25
y = y(0)
x = x(0)0
0
x = x(0)0
0
x
y
x
x
y
x1
1
1
2
2
2
t t1 2
. . . . . .t3
Figure 3.2: Time discretisation
which, in fact, is a system of (n + m) equations in (2n + m) unknowns
{xk, xk, yk
}.
The missingnequations generally arise from the fact that xand xare not independent the latter is supposed to be the time derivative of the former! We can approximate thisrelation in the discrete time grid we have defined. For instance, doing a Taylor expansionofx(t) at point tk1 yields
x(t) =x(tk1) + x(tk1)(t tk1) + HOT2 (3.12)so if we set t := tk and ignore the higher order terms, we get
xk = xk1+ xk1hk (3.13)
wherehk is the length of the time step from tk1 to tk:
hk tk tk1 (3.14)We note that 3.13 provides us withn equations. In fact, it completely determines xk, so wecan eliminate it from 3.11 which can now be solved for xk, yk.
On the other hand, we can also do a Taylor expansion ofx(t) at point tk:
x(t) =x(tk) + x(tk)(t tk) + HOT (3.15)We can then set t:= tk1 and ignore the higher order terms to get
xk1= xk xkhk (3.16)which also provides another form of the missing n equations. This time, however, we
cannot explicitly determinexk from 3.16 since it also involves xk which is also an unknown.However, we can append 3.16 to 3.11 and solve the whole system simultaneously to obtainxk, xk, yk again using a Newton-type numerical method.
3.13 and 3.16 are examples ofintegration formulae, i.e. relations between x k and xk.
3.13 is anexplicit formula since it allows direct determination ofxk from informationat previous steps. This makes the solution of ODEs of the form 3.1 very simple: getxk using 3.13; from 3.1 get xk :=f(xk); get xk+1 using 3.13; and so on.Therefore, noNewton iterations are necessary. However, the same is not true for DAEs of the form3.3.
3.16 is an implicitformula even for ODEs you need to solve a system of equations:
xk = f(xk)
xk = xkxk1
hk
xk xk1
hk f(xk) = 0
2HOT Higher Order Terms.
-
7/23/2019 Imperial Business timeteable
33/130
SYSTEMS OF DAEs 26
t tk-2
tk-1 k
tk-3
Figure 3.3: Linear multistep integration methods
Implicit methods have superiorstabilityproperties to explicit ones. This is a very importantconsideration in process engineering applications because model equations tend to havewidely different time scales. Thus, in practice, we (almost always) use implicit methods.
3.2.2 Higher-Order Integration Formulae
Formulae 3.13 and 3.16 are known as the explicit and implicit Euler methods respectively.They are not very accurate because, in deriving them, all terms in the Taylor expansion
beyond first-order were omitted. As a result, we have to use a very small step lengthh toobtain good accuracy.
Higher ordermethods obtain better accuracy essentially by including higher order termsin the expansion. This can be achieved by using information from more than one previousstep. Here we consider a class of such methods which constitute the backward difference
formulae(BDF) family of methods. The basic idea is quite simple:
From the values ofxattkand previous points (tk1, tk2, . . . , tk), fit a polynomialof degree :
x(t) a0+ a1t + a2t2 + + at (3.17)wherei are linear combinations ofxk, xk1, xk2, . . ., as shown in Figure 3.3.
From 3.17, we can obtain an expression for x(t) by differentiation with respect to t:
x(t) a1+ 2a2t + 3a3t2 + + at1 (3.18)
By setting t = tk in 3.18 we obtain a relationship between xk and xk (and all thepreviousxk1, xk2, . . . , xk):
xk a1+ 2a2tk+ 3a3t2k+ + at1k (3.19)
This is our new integration formula, which can be appended to 3.11 to produce asquare (2n+ m)
(2n+ m) system in the unknowns
{xk, xk, yk
}.
Let us illustrate this procedure in more detail by considering an example. In particular,we will take into account three points tk,tk1,tk2 (i.e. = 2) and, for simplicity, assume
-
7/23/2019 Imperial Business timeteable
34/130
SYSTEMS OF DAEs 27
tk-2
t t
k-1 k
h h
k-2x
x
x
k-1
k
Figure 3.4: Example of a linear multistep method
that they are equidistant with a time steph (i.e. tk tk1= tk1 tk2= h). This allowsus to fit the following quadratic polynomial in time (see Figure 3.4):
x(t) = xk(t tk1)(t tk2)
2h2 xk1 (t tk)(t tk2)
h2 + xk2
(t tk)(t tk1)2h2
(3.20)
Equation 3.20 is an example of a Lagrangian interpolating polynomial. It can easily be
verified that it satisfies x(tk) = xk; x(tk1) =xk1 and x(tk2) =xk2, as required. In anycase, if we differentiate 3.20 with respect to t, we obtain:
x(t) = xk2h2
(2t tk1 tk2) xk1h2
(2t tk tk2) + xk22h2
(2t tk tk1) (3.21)
Settingt = tk in 3.21, we obtain the following approximation for xk:
xk = xk2h2
(3h) xk1h2
(2h) +xk2
2h2 (h)
which simplifies to:
xk = 3xk 4xk1+ xk2
2h (3.22)
3.22 is a second-order integration formula. If we append it to 3.11, we can then solve for{xk, xk, yk} remember that xk1 and xk2 are already known.
Notes
The system of equations 3.11 and 3.19 is normally solved numerically, using a Newton-type method (see Figure 3.1).
To obtain an initial guess for the unknown xk andyk, we can fit a polynomial to the previous points
xk1, xk2, . . . , xk1
and extrapolate to tk. This is known as the predictor step. The solution of equations 3.11 and 3.19 using a Newton type method is usually known
as thecorrector step. This may fail if the initial guess is not good enough (correctorfailure). If this is the case, step h is reduced and the procedure is repeated.
-
7/23/2019 Imperial Business timeteable
35/130
SYSTEMS OF DAEs 28
The difference xcorrected xpredictedcan be used to estimate the error of integration.In the case that this is unacceptably large, the step h is reduced and the procedure isrepeated (error test failure).
Modern BDF codes adjust both the time step h and the order of approximation automatically to guarantee a given accuracy and minimise the number of steps.
3.3 Discontinuities in Dynamic Models
3.3.1 Implicit and Explicit Discontinuities
Process engineering models often include discontinuous equations. We have already seenone classification of such discontinuities as:
reversible and symmetric (cf. section 2.2.4); reversible and asymmetric (cf. section 2.3.3) irreversible (cf. section 2.3.3).However, a different classification is more appropriate from the viewpoint of the solution
of the DAE system. In particular, all of the above discontinuities can be classified asimplicitdiscontinuities we do not know when or even if they will occur. A different type
of discontinuity are those that occur as a result of external action, e.g. opening/closing valves starting/stopping pumps.
These can either beexpliciti.e. the time of their occurrence is known a priori orimplicit(e.g. open a valve when the temperature reaches a certain level).
3.3.2 Why Discontinuities are Important
Discontinuities may cause serious trouble to DAE solvers if not handled properly. The reasonfor this is that BDF-type integration methods assume a polynomial form of the solution
and this may be very wrong if there is a discontinuity in the step being attempted.Consider, for instance, the physical system shown in Figure 3.5a. Initially the pump on
the outlet stream is switched off and therefore the level of the liquidx(t) is rising. However,this rise is reversed once the pump is switched on. The solution to this problem may looklike the solid line in Figure 3.5b, the kink corresponding to the discontinuity caused by thepump starting.
Now suppose that the crosses, (), in the diagram indicate points that the integrationmethod has already determined3. Then the BDF method may well assume a polynomialpassing through these points, and use this to predict the new point shown by a circle, (),on the diagram. This, unknownto the method, lies on the other side of the discontinuity.
The problem with this is that the predicted point, (
), is a very poor approximation
of the actual point, (), on the trajectory. Therefore, the corrector iteration may fail to3We assume that the BDF integration is carried out at high accuracy, and therefore the numerical points
() effectively lie on the exact solution curve.
-
7/23/2019 Imperial Business timeteable
36/130
SYSTEMS OF DAEs 29
x(t)
t
x(t)
(a) Physical system (b) Solution behaviour
Figure 3.5: Discontinuities in DAE systems
establish the latter starting from the former as initial guess. If this happens, the DAE solverwill need to reduce the step and try again.
Even if the corrector iteration does not fail, and the new point, , is established, thedifference which is used as the estimate of the error will be too large and the stepwill be rejected on the basis of the error test.
The most probable outcome of all this is that, one way or another, the DAE solver willreduce the step one or more times until, in fact, the new point it attempts to establish isbefore the discontinuity. Then the step will be successful but every time it attempts tostep across the discontinuity, the same sequence of events takes place. Eventually, once apoint just before the discontinuity is established anda small enough time step is attempted,there is a chance that the solver will be able to cross the discontinuity successfully but inthe meantime much computation has been wasted.
It is therefore important to handle discontinuities properly. There are, in general, threeissues associated with this:
Detecting the discontinuity. Locating the precise time of occurrence of the discontinuity.
Restarting the solution after the discontinuity.
Note that the first two are relevant to implicit discontinuities only for explicit ones, thetime of their occurrence is known a priori.
3.3.3 Detection and Location of Implicit Discontinuities
A technique for detecting and locating implicit discontinuities emerged in the mid-1980sand has been used successfully since. It is sometimes known as discontinuity locking.
The basic idea is quite simple: implicit discontinuities are caused by conditional equationsflipping from one branch to another, e.g.
-
7/23/2019 Imperial Business timeteable
37/130
SYSTEMS OF DAEs 30
tnt*tn-1
x(t)
,(t n nx )
t
(tn-1
x ),n-1
, nx )(t n
Re < 2100 Re > 2100
Figure 3.6: Discontinuity detection
IFRe < 2100 THENLaminar flow equation
ELSE
Turbulent flow equationNow suppose that at pointtn1we are in the laminar flow regime. Then we can lock theequation into this regime, irrespectiveof the value ofRe, and try to determine a new pointat time tn. Of course, the new point (tn, x
n) has no physical meaning since it lies on the
wrong branch ! On the other hand, obtaining this fictitious point (tn, xn) is very easy for
the DAE solver since it lies on a smoothtrajectory going through point (tn1, xn1). Thisis illustrated in Figure 3.6.
Once we have obtained the new point (tn, xn), we can check the logical condition that
determines the status of the discontinuity. For the example, this is
Re
-
7/23/2019 Imperial Business timeteable
38/130
SYSTEMS OF DAEs 31
tt
x(t)
L t
Ut * *
*
Figure 3.7: Discontinuity location (time axis not to scale)
3.3.4 Restarting After Discontinuities
The final task is to restart the simulation beyond the discontinuity. That is we need to
establish the values of the variables just aftert
(or, at t
U to be more precise). Of course,there is no problem getting the values just before t (at tL): all we have to do is evaluateour interpolating polynomials attL.
We denote the values just after the discontinuity by
x(t+), x(t+), y(t+), u(t+)
Of course, these values have to satisfy the DAE equations describing the system behaviourafterthe discontinuity, i.e.
f+(x(t+), x(t+), y(t+), u(t+)) = 0 (3.23a)
g+(x(t+), y(t+), u(t+)) = 0 (3.23b)
This is a system of (n+m) equations in (2n+m) unknowns, namely x(t+), x(t+) andy(t+). Clearly, we are missing n equations. These can be obtained by applying the con-servation laws of nature at the discontinuity. For most systems, these are quite simple:
q(t) =q(t+) (3.24)
where q is the vector of conserved quantities (e.g. mass, amount of substance, energy,momentum, electric charge etc.).
The conservation equations 3.24 will normally yield n additional relations. This ishardly surprising since n is the number of differential equations f(x, x,y,u) = 0 which
were themselves derived from the same conservation laws applied over an infinitesimal timeinterval,t 0.
-
7/23/2019 Imperial Business timeteable
39/130
SYSTEMS OF DAEs 32
01
z z2
F(z ) F(z )u - u1
1
2
2
z
Figure 3.8: Discontinuities in a mechanical system
3.3.4.1 Systems Satisfying Continuity of Differential Variables
For most systems of interest to process engineering, the n differential variables x eitherinclude the conserved quantities q, or are directly related to them through a one-to-onemapping of the following form:
x= F(q) q= F1(x) (3.25)From 3.24 and 3.25, we conclude that
x(t) =x(t+) (3.26)
i.e. that the differential variables are continuous across the discontinuity at t.For instance, in our example of a liquid tank with the pump on the outlet stream, we
could have the primary conserved quantities:
q {Mass holdup (M), Energy holdup (U)}and the differential variables:
x {Liquid level (l), Liquid temperature (T)}
Now, in this case, there is a one-to-one mapping between
M
U
and
lT
, and we can
conclude thatl(t) =l(t+)
T(t) =T(t+)
wheret is the time at which the pump starts.
3.3.4.2 Systems not Satisfying Continuity of Differential Variables
However, not all systems satisfy 3.25. Consider, for instance, two identical rigid particles,each of mass m and radius r, moving towards each other while being subjected to forcesF(z) that depend on their position z (e.g. in a gravitational, electric or magnetic field).
Carrying out a momentum balance on the first of the two particles, we obtain:
d
dt(mu1) =F(z1)
which, of course, is simply Newtons law of motion:
mdu1dt
=F(z1) (3.27)
-
7/23/2019 Imperial Business timeteable
40/130
SYSTEMS OF DAEs 33
On the other hand, an energy balance yields:
d
dt
KineticEnergy
+ Potential
Energy
= 0
Since the kinetic energy is 12mu21 and denoting the potential energy at a position z in the
field by P(z), we get:d
dt(
1
2mu21+ P(z1)) = 0
mu1du1dt
+ d
dt(P(z1)) = 0
mu1du1dt
+dP(z1)
dzdz1dt
= 0
But since dz1dt u1, this simply reduces to:
mdu1dt
+dP(z1)
dz = 0 (3.28)
Comparing 3.28 with 3.27, we deduce the well-known relation between force and potentialenergy:
F(z1) = dP(z1)dz
(3.29)
For instance, in a gravitational field (with z being the vertical coordinate), we have:
P(z) =mgz F(z) = dPdz
= mg Weight
Overall, then, the model of the two particle system is:
dz1dt
=u1 (3.30a)
dz2dt
=u2 (3.30b)
m
du1
dt =F(z1) (3.30c)
mdu2dt
=F(z2) (3.30d)
Now, a collision will occur at a time t if:
z2(t) z1(t) = 2r (3.31)
This clearly involves a discontinuity in the motion of the two particles. Assuming perfectlyelastic behaviour, both momentum and energy will be conserved by the collision. Therefore,we have:
mu1(t) + mu2(t
) =mu1(t+) + mu2(t
+) (3.32a)
12
mu21(t) +1
2mu22(t
) =12
mu21(t+) +1
2mu22(t
+) (3.32b)
The interesting point about equations 3.32 is that they have two solutions, i.e. there is nounique mapping between the conserved quantities (momentum, energy), and the differential
-
7/23/2019 Imperial Business timeteable
41/130
SYSTEMS OF DAEs 34
m added at time t* *F , h in
out outF , h
in
Mass Holdup , M
Energy Holdup , H
Figure 3.9: Buffer tank with discontinuous input
variables (u1, u2). From the mathematical point of view, this multiplicity is caused by thesquare terms in the energy conservation condition 3.32b. In any case, the two solutions are:
Solution 1: u1(t+) =u1(t
); u2(t+) =u2(t
)
Solution 2: u1(t+) =u2(t
); u2(t+) =u1(t
)
However, solution 1 is physically impossible: the particles cannot continue moving just asbefore without having to go through each other! So, in fact, solution 2 is the only possibleone and, as we can see, this involves a discontinuity (a jump) in the differential variablesu1 and u2 at time t
.
3.3.4.3 Systems Subject to Impulsive Inputs
Some physical systems may involve instantaneous additions of mass or energy. From aphysical point of view, one can of course argue that nothing can ever be done instanta-
neously: any transfer of mass and energy can take place only at a finite rate and thereforewill have finite duration. However, if this transfer takes place extremely quickly comparedto the system dynamics, we may well wish to model it as an instantaneous event.
In such cases, 3.24 must be modified to:
q(t) + q= q(t+) (3.33)
where q(t) is the amount of quantity qadded instantaneously at time t.Consider, for instance, a simple buffer tank modelled in the standard fashion:
dM
dt
=Fin
Fout (3.34a)
dH
dt =Finhin Fouthout (3.34b)
H=M h (3.34c)
-
7/23/2019 Imperial Business timeteable
42/130
SYSTEMS OF DAEs 35
Now, suppose that at time t we instantaneously dump an extra amount m into thetank. We then have:
M(t) + m =M(t+) (3.35a)
H(t) + mh =H(t+) (3.35b)
where h is the specific enthalpy of the liquid added. Once again, we note that the differentialvariables M(t) and H(t) are notcontinuous across the discontinuity!
3.3.4.4 Summary
We can summarise the discussion on discontinuities as follows:
Continuity of the differential variables across discontinuities is usually the correctassumption.
However,
This may not hold for systems with impulsive inputs, e.g. a particle colliding instantaneously with another or with a solid surface
a system subject to instantaneous addition of mass and/or energy.
Thus, it is not the mathematicsbut instead the physics of a system that determine whathappens at a discontinuity.