National Technical University of Athens School of Chemical Engineering Department II: Process Analysis and Plant Design Lecture 1: Basics Concepts Instructor: Α. Kokossis Laboratory teaching staff: Α. Nikolakopoulos
Review Basic Concepts Process Simulation i. Unit simulation vs flowsheeting ii. iii. Mathematical representation Simulation types - Sequential modelling - Simultaneous approach - Equation-oriented approach
1. Introduction
Simulation of individual processes i. Simulation of process models (unit operations) Operating parameters (pressure, temperature) Feed/input Flows Composition Pressure Temperature Process Products/output Flows Composition Pressure Temperature Design parameters (Sizing, geometry)
Flowsheeting ii. Industrial flowsheeting Process flowsheeting as integration of process models Computational work: develop calculations around - Mass and energy balances - Scale-up and sizing - Costing with respect to the integrated processes of an industrial plant at steady state. The calculations assume individual models for the process units and the focus shifts to combine the individual calculations as a whole.
The role of flowsheeting in Process Design Needs Flowsheet Synthesis Analysis Mass and energy balances Costing/sizing Decision variables (Initial values) Parameter optimization Process selection Economic Evaluation Final Flowsheet
Potential in process design Advantages i. Significant reductions in the development time Use of unit operation libraries Property models and thermodynamics Correlations and supporting functions ii. Significant improvements of the existing process Experimentation with alternative processes (not systematic though!) what if studies and analysis Parametric optimization studies Archiving and re-use of design technology
Generic process representation a. Process unit representation Input/output structure Distinction between input/output variables and parameters input, x i Units Output, y i parameters, u i i.e.: f i (x i, y i, u i ) = 0, then, y i = g i (x i, u i ) fixed calculated
Open and closed systems Open systems: I/O dependencies are described by analytical expressions. They could be - algebraic equations - differential equations (simple, with partial derivatives) General formulation: f j (x 1, x 2, x m ) = 0, y k = g (x 1, x 2, x m ) ; x i (0) = 0 j = 1,..., m k =1,..., n i = 1,..., m The remaining of the models assumes algebraic sets of equations
Systems representation Equations variables - parameters residuals NE = n f 1 (x 1, x 2,, x m ) = 0 = r 1 f 2 (x 1, x 2,, x m ) = 0 = r 2... f n (x 1, x 2,, x m ) = 0 = r n NV = m
Design variables and selection of specs a. In simulation NE = NV. If NE>NV, the remaining NV NE = NP variables (design variables) have to be selected and fixed (set them as parameters) Distillation: product purity Reaction: conversion Flowsheet: recycle/purge stream b. Note: The parameters of one model may be variables in another. The role of inputs and parameters may be swapped across models. Examples of typical design variables set as parameters: c. In closed models, the acceptable combinations of parameters is not clear and is usually provided as user options (e.g. distillation: RR over Reflux Boilup or Reboiler Heat Duty)
Degree of freedom analysis When we define additional equations, NΕ > NV the systems becomes overdefined, while for NV > NE there are degrees of freedom (i.e. an optimization problem) In the past a degree of freedom analysis has been an important task in design. Nowadays, such analysis can be performed by the flowsheeting software.
Closed systems Open systems: minority of the process models currently used. Closed: the relationship between outputs and inputs is indirect. Examples algorithms and procedural code widely used as Fortran code for instance. Compare with Open systems: direct relationships through analytical expressions (e.g. equations) Can map open and closed systems with each other? Open Closed Open? Closed (apparent mapping) Sets of equations: defined as the residuals from closed-system calculations For every r r y i i ( x, y, z ) r, i i i i xi u Δx i i Δyi i (closed models) (Jacobian element)
Open and closed systems Relationships and mappings between different technologies inputs parameters outputs x 1, x 2,..., x n u 1, u 2,..., u n y 1, y 2,..., y n f 1 = r 1 f 2 = r 2... αij βij γij f n = r n f n equations that correspond to the open model x x + x y + y (closed model) i i i It calculates r i as a results of the changes of ri ri ri It calculates,, α ij, β ij, γ ij x y u j j j ( ) x, y, u i i i
2. Flowsheeting technology
Types and technologies i. Sequential modular approach ii. Simultaneous modular approach iii. Equation-oriented approach Let us use an illustration as a drive to explain the technologies
Illustration of a simple flowsheet Typical reactor-separation recycle structure A simple flowsheet Mixer Reactor Separator Flowsheet includes: Reactor, separator 2 mixers 1 recycle Mixer
Input-output representation Systems representation Four (4) subsystems y 31 x 12 y 21 x 11 y 11 Mixer Reactor x21 x31 Separator Two indices used for each flow The first denotes the process x 42 y 32 The second denotes its role as input or output x 41 Mixer y 41
Mathematical representation and models Sets of equations (constraints) for the flowsheet 1. Constraints for each unit (balances: mass, energy etc; economics) mixer1: f1 ( x 11,x 12,y11 ) = 0 reactor: f2 ( x 21,x 21, u2 ) = 0 f ( x,y,y, u ) = 0 seperator: mixer2: 3 31 31 32 3 f4 ( x 41,x 42,y41 ) = 0 x 12 y 31 Generalization: x ij y ij u i input j in unit i output j from unit i parameter of unit i y 21 x 11 y 11 Mixer Reactor x21 x31 x 41 y 32 x 42 Mixer Separator y 41 Any other constraints;
Mathematical representation (2) Connectivity constraints 1. Connectivity x12 y31 = 0 x21 y11 = 0 x31 y21 = 0 x42 y32 = 0 x 12 y 21 x 11 y 11 Mixer Reactor x21 x31 y 31 Separator y 32 x 42 Notes: unit constraints relate to mass and energy balances, constraints for physical properties, correlations, economics, upper/lower limits Unit parameters (design parameters) relate to specifications (e.g. temperature and pressure of a reactor) required to impose user preferences and/or make the balances a square set of equations and variables x 41 Mixer y 41
Sequential modular approach Basic Idea 1. Simulate each process in sequence following the physical flow of streams (though not necessarily) 2. Whenever needed, guess streams from forward or backward units. These are termed tear streams and their guesses are the pivots of convergence 3. Tear stream variables are calculated over cycles of calculations 4. Overall convergence is attained when - each and every process model converges - each and every tear stream converges Commercial software Aspen Plus (Evans et al, 1979) HYSIS (Mahoney & Santollani, 1994) SUPERPO (Futtellugen)
Sequential modular approach (illustration) Example S2 y 31 x 12 2 3 x 11 y 11 S3 y 21 S4 Mixer Reactor Separator S1 x21 x31 1 y 32 x 42 S5 x 41 S6 Mixer 4 y 41 S7
Sequential modular approach (illustration) Use tearing based on natural flows Using such tearing, the sequence of calculations is ( ) = = ( ) f x,x,y 0 y g x,x 1 11 12 11 11 11 11 12 ( u ) = = ( u ) f x,x, 0 y g x, 2 21 21 2 21 21 21 2 ( u ) = = ( u ) y = g ( x, u ) f x,y,y, 0 y g x, 3 31 31 32 3 31 31 31 3 32 32 32 3 x 12 (tear at ) convergence (no tearing) convergence (no tearing) convergence (no tearing) convergence ( ) = = ( ) f x,x,y 0 y g x,x 4 41 42 41 41 41 41 42 Convergence in x 12? If yes, stop. Otherwise, iterate
The sequential modular approach as an algorithm Sequential modular steps y 31 x 12 y 21 x 11 y 11 Mixer Reactor x21 x31 Separator x 41 y 32 x 42 Mixer y 41
Tearing and its importance in convergence Remarks In our case, the single tearing stream has been the recycle calculated as: ( ) x = f x,y k ' k 1 k 1 12 12 31 There is no unique option for tearing. Indeed, there exist degrees of freedom around the tearing options and they can be exploited for better convergence Following natural flows in the flowsheet is not the best advice for the selection of tear streams Internally, the tearing is handled without any request by the user to define the tearing variables. However, the selection of tearing variables can be critical. Tearing may destabilize convergence. The case is pronounced when the number of recycles increase.
Tearing options are possible even for simple flowsheets Alternative tearing scenarios y 31 x 12 y 21 x 11 y 11 Mixer Reactor x21 x31 Separator x 41 y 32 x 42 Mixer y 41 Tearing around reactors, separators, etc
Simultaneous modular approach Simulation trade-offs and challenges: The sequential modular approach faces difficulties to converge in large problems with several recycle streams. The simulation approach may have to iterate around distant (process unit) blocks The approach holds back on flowsheet calculations to ensure (robust) convergence for the individual blocks Basic idea Simultaneously converge all individual subsystems by linearizing (simplifying) around nominal operating points the I/Os of individual blocks Commercial software Flowpack (predecessor of today s packages) Rosen (1962) Umeda et al. (1972), Reklaitis (1979), Mahalec and Motard (1979), Biegler & Hughes (1982) All units are written as in sequential modular approach. i.e. : = ( u ) α y g x, y x ij i ik i ij ijk ik k ij k= 1
Equation-oriented simulation Motivation: Linearization is already made within numerical routines (e.g. Taylor approximations typically replace nonlinear sets of equations in block balances) Advances in numerical computing to handle larger problems Basic Idea Tackle the full problem as a single set of equations, building custom-made functions to handle block-diagonal structures Commercial packages gproms Aspen Plus / HYSIS (though not truly through analytical models)
Equation-oriented approach Sets of equations 1. Process unit models 2. Connectivity constraints 3. Design specifications Typical challenges Break down the large system into smaller tasks Degree of freedom analysis Handle multiplicity in solutions Non-linear aspects of the problem constraints Initialization Management of side calculations related to 1 st and 2 nd order derivatives (Jacobian, Hessian)
Pros and cons: sequential modular vs equation-oriented Sequential modular Equation-oriented Separate simulation for each unit Modelling is not as flexible Robust convergence Initialization is useful Small memory storage Applications are easy to set up (little left to the user) Simultaneous solution of equations Modelling is very flexible Lack of robustness Initialization is critical Larger memory storage Applications take longer times and require more sophistication (much left to the user)
Hybrid applications Combine Sequential modular (closed systems) used initially to establish good reference (nominal) points with Equation-oriented simulations where previous (nominal) solutions can be used as Initial points Handle stiff sets of non-linear equations