0% found this document useful (0 votes)
32 views

Modelling and Simulation

Modelling and simulation notes

Uploaded by

Harshay Dolas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
32 views

Modelling and Simulation

Modelling and simulation notes

Uploaded by

Harshay Dolas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
Problem definition and formulation: 2 Preliminary and detailed analysis 3, Evaluation phase, 4 Application. 1 ving fig. gives the activities Jet building is an iterative procedure, The following fg: 8 The mode! building is an iters e model. to be carried out while development of the mc Formulate meee . ‘. uation Experience adjectives, eval cost of development Select key variables, physical principles Management objectives Problem la. GaGa eal) cto bernoplied, text definition plan to be used phase Develop model Design Estimate anes parameters Evaluate & uonbi mde Evaluation phase Fig. 1.5 Steps in model building 1. Problem definition and formulation phase : In the particular phase you must define the the important elements that pertain to the problem and its solution. The degree of accuracy needed in the model and thi potential uses of the model must be determined. One must also evaluate the structure and complexity of the model ; ascertain. (a) Number of independent variables to (b) Number of ind ependent equations re wo (©) The number of unknown parameters problem to be solved and to identify be included in the model, quired to describe the system. in the model. Before carrying out actual model justification for the effort of model carrying out such a project. lling work, it is important to evaluate the economic ling and the capability of the supporting staff for 2. Design phase : Activities in the design phi general description of the Progra employ a useful model, formul, simulation of the model. ase include specification of the information content, mming logic and algorithms necessary to develop and lation of the mathematical de: ription of such model and First define input and output variables and det a termine the system. Also select the specific mathem: fic mati ‘atical representations to be used in the model, as well as the assumptions and limitations of the model resulting from its translation into actual computer code. Specify computer input/output media, develop program logic and flowsheets and define program modules and their relationships. Use of existing subroutines and data bases saves you time. 3. Evaluation phase : This phase is intended as a final check of the model. Testing of individual model elements should be conducted during earlier phases. Evaluation of the model is carried out according to the evaluation criteria and test plan established in the problem definition phase. Next carry out sensitivity testing of the model inputs and Parameters and determine if the apparent relationships are physically meaningful. use actual data in the model when possible. This step is also referred to as diagnostic checking, and may entail statistical analysis of the fitted parameters. Model validation consists of three parts : i) Validation of logic ii) Validation of model assumptions iii) Validation of model behaviour These works involves comparison with historical input-output data, or data in the literature, comparison with pilot plant performance, and simulation. In general, data used in formulating a model should not be used to validate it if at all possible, because model evaluation involves multiple criteria, it is helpful to obtain expert opinion in the verification of models. No single validation process/procedure is appropriate for all models. Nevertheless it is appropriate to ask the question. What the model to do ? You would like the model to predict the desired features of the process performance with suitable accuracy. A model relates the output ie, the dependent variables, to the independent variables. Each equation in the model usually includes on or more coefficients that are presumed constant. The parameter means coefficient and possibly input ot initial condition. With the help of experimental data, one can determine the form of the model and estimate the value of some or all the parameters in the model. eal rate a — \ 1.2 Classification of Models : f Two general categories of models exists + theory ’ { ‘A) Those based on physical theor gb or Those based on strictly empiricial descriptions (black box models) | eet Insroduction/2 : = 4 chemical laws for ex. mass. > Mathematical models based on physical and chemical | fy ASS ang I reaction, kinetics are frequently empioy.4 nics, chemical rea energy balances, thermodyna / sae , ive because a pon, i ephimization applications, These models are conceptually ot fem is conaenenl model for any system size can be developed, even before the sy TUCted ed which only correlay.. On the other hand, an empirical model can be de s of the proce: mput-output data without any physicochemical analy ication of models as theoretically based versus empirical according to the followin In addition of the clas: We can generally group mod (a) Linear vs nonlinear (b) Steady state vs unsteady state (©) Lumped parameter vs distributed parameter (d) Continuous vs discrete variables, ronerd) (a) Linear vs nonlinear: Linear models exhibit the important property of Super Position ; nonlinear ones do not. Equations are linear if the independent variables o, their derivatives appear only to the first power, otherwise they are nonlinear, — (b) Steady state vs unsteady state : Other synonyms for steady state are time invariant, static or stationary. These terms refers to a process in which the values of the dependent variables remains constant with respect to time. Unsteady state Processes are also called non Steady state, transient or dynamic and represent the situation in which the process dependent variables change with time. (©) Distributed vs lumped parameter : A lumped parameters representation Parameter on the other hand, takes into account detailed variations in behaviour from point to point through out the system. (d) Continuous vs discrete variables : Continuous means that a variable can assume any value within an interval, discrete means the variable can take on only distinct values in the interval. ‘3 Formulation of Problem : ‘As mentioned in the introduction, various types of process simullation problems be ormulated. For steady state simulation, the following problems are most common. * Flowsheeting problem (solve the model equations given all input information, operating conditions and equipment parameters/sizes - i.e. given all input information, determine all output information) ‘© Specification (design) problem (solve the model equations where instead of all input information, some input and some out information is given ~ ic. determine the remaining input and output information) © Optimization problem (here the model equat objective function and a set of constraints ns are solved subject to an . determine the values of, some input variables such that the objective function is minimized or maximized and some output specifications are satisfied. Syjtheis proble the above simulation problems ~ Le. for a given input (me) information, determine the process flowsheet and the remainin, information fequipment design, etc) such that the given output ge is matched), ~~ Obviously, the flowsheeting problem is the simplest and the synthest the most difficall can be noted that specification, optimization and syntheses) require the use of a tial and error procedure (or eration loops) 10 obtain the ee In all cases, for any trial, a flowsheeling problem is solved. That is, the flow problem needs to be solved in an inner iteration loop when solving simulation Prob related to specification, optimization and synthesis. | 1. Flowsheeting problem : ley In this problem formulation, the, | must define all variables def as oureur etn Bree oer BOoeE Oe wei/atecams plus ait tained condition” variables sha" | | equipment Paramen| All intermediate stream and oa | stream variables are calculst) through solution of an approgs. OPERATING EQUIPMENT model An example involvinga CONDITIONS PARAMETERS distillation column is shown bein, The feed composition, the feed flowrate and the feed temperature & pressure are 4 input stream variables. Specification of one of the product flowrates (D or B) and on, the heating/cooling duties (Qr or Qc) are the operating condition variables, The equipne parameters are the number of stages and the feed location. : Flowsheeting problem : Distillation column simulation Ore. ven: Feed compositions amas a (©, Dor B) Heating and cooling duties QQ) Find: Product and compositions and temperatures idee Q, 18 & Simulation / 249 2. Specifeation Problem tis Ss renner cs Sorceress In the specification problem, instead of Some variables that must be specified in a jowsheeting problem, some output or intermediate stre ‘am variables are specified as own in the figure below. In this figure lace jadiablse iecleeee ‘Some output variables have been specified instead of some variables belonging to the Set of operating conditions and equipment parameters Because of the nature of the problem, ; put Solving the flowsheeting problem in pee FLOWSHEET SUaEUL an inner-loop (as shown in the figure below) can solve specification Problems in an iterative manner. We assume values of the unknown variables belonging to the set of Operating conditions and/or OPERATING EQUIPMENT equipment parameters, then we have CONDITIONS — PARAMETERS the correct problem formulation for the flowsheeting problem. We now culated output stream variables, we awe wn values. If yes, we have found the jlution to the specification problem. If no, we hi; tknown variables and solve the flowsheeting lution has been found, The specification problem (solution strategy) Given: Feed compositions, feed flowrates, target product compositions Find : Product flowrates, heating duties SOLVETHE FLOWSHEETING PROBLEM ARE TARGET PRODUCT COMPOSITIONS SATISFIED? 3. Optimization problem : OPTIMIZATION PROBLEM. Choose Target product composition Number of trays, feed tray location To Minimize Objective= F (yield, energy, capital cost, .. Here, we need to determine the unknown variables Usually associated 4 Specification problem subject to maximizing (or minimizing) an objective function oy oF without constraint functions. Thus, specification problems can also formulated ,., optimization problem if additional conditions (such as the objective function constraint functions) are added to the set of equations representing the Mathemay, model of the process. Optimization problems are one of the most commen probj., Encountered by the process engineer in the industry. Just like the specification Probie solving the flowsheeting problem inan inner Joop canalso solve the ‘optimization probj., ‘This is also the most common form of solution Strategy used in the indusiry. Howey frith the advance of computer science and mathematical techniquies, there is 24 increas, tendency to solve the optimization problem with non-linear Programming (NLP) methoe If the mathematical model is linear, then LP methods are used while if the un} variables include continuous as well as discrete variables, Mixed Integer Non-Line, Programming (MINLP) methods are employed. j 4. Synthesis problem : INPUT OUTPUT ey Inputs and outputs are known bit lowsheet, operating conditions and equipme parameters are uiknown Synthesis problems are the most difficult to solve and formulate. Here, as i figure indicates, we only know the input information and the output (produ: information). We do not have any information on the flowsheet or the equipment’s ar their parameters or condition of Operation. Here, the most common approach is to general alternative flowsheets, then evaluate them by solving the specification or optimizato problems, This process is repeated until an adceptable flowsheet has been foun While this approach is oriented towards obtaining some solution, there is no guaran ihat the obtained solution is th Thisis also not possible since theoretical there can, slutions Another approach inns tee solve the flowsheeting, the specific tion and th an MINLP method. While this flowsheet), it may be difficult to mathematical models, Still, solution iables have be ives have been inv very large number of alternative mathematical programming, problem, s Optimization problems all together with at ind the optimal salution (also the opticnal canis large Problems ar problems with complex OHA late problems involving thousands of Seer Be problems ings thousands of 7.4 Steps tor Steady State c:.... best, or, all-possibfe alte equations ancl > ENE OT, 7.4 Steps for Steady Stato Simulation ; A mathematical model ¢o, steady state simulation problem, The can however be applied to simulation flowsheeting problem requires the the entire flowsheet. The mathemati nd energy balance equati The solu ting of a set of algebraic equations represents any Principle of the solution approach described below, ” problems involving distributed models, A typical olution of a set of algebraic equations representing, ical model Tepresents only mass balance equations or approach needs to address the * — Simulation approach following issues: (method of solution) * — Flowsheet decomposition © — Equation ordering . Convergence technique ¢ Simulation strategy ___ Since the flowsheet may include more than one unit ‘Operation, it is necessary to decide if all the model equations for all the unit eperations should be collected and solved as one set or if the individual models for each unit Operation should be solved separately? For the later, the flowsheet description needs to be further analyzed. The analysis should provide information on exi istence of recycle streams and Possibility of dividing the flowsheet into smaller parts. Flowsheet decomposition Performs these operations. In addition, the flowsheet decomposition tells what should be the order in which the individual models (of the unit ©perations) should be solved. If all the equations are solved together, then also it may be possible to rearrange the equations in smaller blocks — this is quation ordering. Finally, whichever way the equations are solved, since a numerical nethod is used, the unknown variables are calculated through an iterative solution echnique (convergence technique). The important issues here are how to provide the tial estimates for the unknown variables, which convergence technique to use and ves the convergence technique need derivative information (if yes, how to supply it?)? Once a simulation problem has been defined, the simulation strategy helps to efine the most appropriate solution strategy for the problem. That is, based on the ‘oblem description, it helps the user to select the solution approach (which can be a ngle method or a combination of methods), For example, start by solving the individual odels separately and after a few iterations using successive substitution as the fivergence technique, switch to solving all the equations together with the Newton’s (Solution of algebraic equations) ‘Simulation of Chemical Engineering Systems /- method as the convergence technique. Since the Newton's ee Teena initia) estimate to be able to converge to a solution, the first step generates this f : wos method. Note that while for Newton's method derivative information is necessary, j a not necessary for successive substitution. s8 Modeling & § process Simulator tl mulation/259 Inits simplest form, a process simulator; His (nse ome atoris an engineering tool providing automated atta mustesn aes ae iH In order to be able to do this, the simplest proces a as Z 3 ut section in whi " Pine individual unit descriptions hich where the flowshee! are git t description ‘i Siven, an output secti - id values , a library of unit operation models, put section which contains the a database for physical properties e extacted, when needed), a solver library js up the simulation problem and oa Se problem) Often, a process simulator is mistaken for a process engineer. A process | mulator perform calculations based on the i engineer has given. The process simulator tpaineer to make decisions by and lulator does not make deci Providing the necessary The organization of a typical sown in the figure below. In this fig sions. It helps the process information. Process simulator in terms of the main functions are jure, the main functions are related to what a simulator must have in order to perform these functions, For example, in order to define the problem, the simulator needs property data, i pect unit module data and cost data. The boxes on the left fund side of the figure indicate the functions the simulator performs and the boxes on theright hand side of the figure indicate what they need in order to perform the functions. How are process simulation packages organized ? User-supplied information (flowsheet, compounds, specifications) | Problem definition Physical property data Data module data Cost data Physical property routines Data module routines x Construction of solution procedure Cost routines —_*__ Initial guesses for iteration variables Mathematical routines ‘ulations Physical property routines Unit module routines Equipment sizing Cost routines Economic analysis routines Costing, Fig, 7.4 Organization of a simulation package Physical property data ator is shown in the next figure . Here, ge SF ocees einul of a proce e boxes on the left hand sides oy The main features ; Fh contents of a modern simulator is shown in femme ene ae eee 2 is a knowledge-bas a the above figure . The simulator executive is a kr : Z ary for any specified simulation problem from a collection of objecy, information nec A i 2 ts can commu: available to it. In object oriented programming, all the objects mnicate with each other with or without the simulator executive. The poe Cree is needed for solving a simulation problem. In this way, the simulator performs other functions j, addtion to process simulation. 7.8 Structure of a process simulator : Commercial procss simulators : The three most well-known commercial process simulator are © ASPEN plus - Aspen Technology, USA. e Pro-II/provision - Simulation Sciences, USA (Seibe, UK). ¢ — Hysis - Hypro Tech, Canada (AEA Technologies, UK) ° CHEMCAD 5.1 Chemstations (USA). es, model parameters, etc Properties estimation Simulator executive Numerical methods Costing. sizing etc. Fig.7.5 Main features ASPEN and Pro-II are steady s a y State process simulators w} imizati features. Both of them employ a sequential modular approact i nae Pook ami state and dynamic simulation features, It ee aa ces boll testy emplo: i i: i has the largest number of users followed by Bai amas anaes Sree, . e three simula! have Windows-based PC-versions. All hay i : a © extensi i properties, have a large collection of unit operation modes segreomPounds pe 4 lermodynamic models of a process simulator, Q4 A) Consider two solute batch extraction as shown in figure with interacting equilibria. Develop model equations. Solution: Multisolute Batch Extraction: Two solutes distribute themselves between the two phases as concentrations X, and Y,, and X, and Yq and with rates Q, and Q,, respectively, as shown in Figure. The corresponding equilibrium concentrations X,* and X,* are functions of both the interacting solute concentrations, Y, and Ys, and can be expressed by functional relationships of the form X) = fh Ya. Yo) Yon ams \ Xp finey( Ya, Yn) vxaXa ST ay op Typical representations of the way that the two differing Two solute batch extraction equilibrium relationships can interact are shown in Figure. wom te = ween a - ‘ s < SS = a em * % For multi-component systems, it is necessary to write the dynamic equation for each phase and for each solute, in turn. Thus, for phase volume V,, the balances for solute A and for solute B are Ys Vo Ge = KiaalXa ~ XV qd von Kisa(Xe aM The overall mass transfer coefficients are also likely to vary with concentration, owing to the complex multisolute equilibria, such that: Kia = f.(Xa.Xa) Kin = fu(X.Xn) Q4 B) Consider a continuous binary distillation column. Develop model equations for i) Feed plate, ii) 'N' plate and iii) Reboiler. Solution: Continuous Binary Distillation: Fora saturated liquid feed with q=1 U=L+F v=v' Forany platen above the feed as shown previously for constant liquid holdup conditions. Magy = L%n-1 — n) + V(Yne1 — Yn) The component balance for the feed plate is given by ay a Mage = Eker ~ Exe + V yn — Vor + For It and for any plate m, in the stripping section, below the feed Aen Man = UG 1 — Xm) +V (Yous Ym) For the reboiler dep, rr Maar = Uxw— Wx - Wye The controller equations are also required to complete the model. W=f(Mp) V'= fxs) The relationships around the top part of the column and control of reflux drum level remain the same as those for the batch situation, described in previous section. dMp at d(M uM =Vyi - (lo + D)xp =V-D-b Assuming theoretical plate behaviour, AX Ya “T+ (a- Din (Q4 C) Develop a model for steady-state gas absorption with heat effects. Yout, TG out 1 Xin Thin 4 7 Solution: Sm bn L_*__» Yin. Tein Mout Tout Steady-state gas absorption with heat efets Steady-State Gas Absorption with Heat Effects: Mole ratio and mole fraction contents are related by and X= and x= Subscripts L and G refer to the liquid and gas phases, respectively, and subscripts ‘in’ and ‘out’ refer to the inlet and outlet streams. Steady-State Design: Inthe steady-state design application, the flow rates Lm and Gm and concentrations Y,,, Xi. Your and Xoue will either be specified or established by an overall steady-state solute balance, iene LaXin + Gm Yin = LanXout + Gn Yout Temperatures Ty, and Tay, will also be known, The problem then consists of determining the height of packing required to obtain the above separation. Steady-State Gas Absorption with Heat Effects: Fora small element of column volume dy_ Rate of loss Rate of gain Rate of solute from | = | of solute in | = | of solute the gas the liquid transfer Here K,,a (kmol/m3 5) is the overall mass transfer coefficient for the liquid phase, based on mole fraction in the L-phase, x* is the equilibrium liquid phase mole fraction, and Ac is the cross-sectional area of the column (m*). Hence with dV=A.d2 aY _ Kusa(x’ —3) dz Gm and aX _ Kua(xt — x) a2 Steady-State Gas Absorption with Heat Effects: Energy Balance It is assumed that there are no heat losses from the column and that there is zero heat exchange between the gas and liquid phases. Consequently the gas phase temperature will remain constant throughout the column. A liquid phase heat balance for element of volume Vis given by Rate of gain of heat) __ (Rate of generation bythe liquid) ~ \ heat by absorption LAccpdTx = Kia (x" —x) dVAHats or where Lis the total mass flow rate of liquid (kg/m? s), cp is the specific heat capacity of the liquid (ki/kg K) and Hy,, is the exothermic heat of absorption (kj/kmol solute transferred). Hence aT _ Kuala" — x) Hate dz Ley The temperature variation throughout the column is important, since this affects the equilibrium concentration x", where x" = feq(y, Ti) {@28) Develop a model for tank drainage system based first law of thermodynamics, Solution: Atak of diameter B, containing liquid of depth H, discharges via a short base connection of diameter d, ‘as shown in Fig. The tankis completely filed intially <1 Inthis ease, the problem invelves a combination of the total material balance with a hydraulle relationship, representing the rate cf drainage. ‘Assumptions: 1) Liquid density is constant, 2) Aasence of frictionsl fow effects The total mater.al balance equation becomes Inabsence of any friciona low effects, the outlet flow velocity, is related tothe instantacieous det of liquid veithin the tank, by the relabonship, From rst law of termadynamies, v= (2gh)"? at where mw Pea ang at 4 is the discharge pipe velocty, Wis the volume of liquid in the tank, hfs the cdopth of igud inthe tank and g ste constant of gravitational acceleration, The total ‘material balance equation now becomes. ‘The above equations are then sufficient to define the model which has the Following simple analyical solution Il reaction shown below is carried out in an isothermal constant volume 2 C) The complex chem batch reactor. Develop model equations and draw information flow diagram. Solution: ‘The model equations for each component of this system are a, dt Ca If the number of equations is equal to the number of unknowns, the model is complete and, a solution can be obtained. The easiest way to demonstrate this is via an information flow diagram shown below. Ge £9 he, “Reo, + Co-Ks

You might also like