Process Modelling Simulation Subject contains • Basics of Modeling- Definitions, Modeling and its type, Procedure for modeling, Benefits, Use in Chemical Engg , Disavantages etc • Unsteady state modelingSimple models(Derivation) Numerical Problems • Numerical Technique • Lumped Parameter Models-Tank , Reactor models etc. • Distributed parameter (Steady state) • Distributed parameter (Unsteady state) Process Modelling & Simulation (CHE-4101) • • • • • Text/Reference Books: Computational Methods in Process SimulationW. F. Ramirez Modelling and Simulation in Chemical EnggRoger E Franks Process Modelling, simulation and control for chemical engg.- W.L.Luyben Numerical methods for engg. – S.K.Gupta Lab: Process Simulation & Control using ASPEN- 2nd Ed. Amiya.K. Jana Definition • Process: It is physical or chemical changes that takes place in a system. • Model: It is mathematical representation of a process OR Imitation of reality • Simulation : Actual experimentation of mathematical model OR solving the mathematical model. • Microscopic Balance: Ex:PFR , partial π derivative( ππ‘ • Macroscopic Balance: Ex: CSTR , total derivative π ( ) ππ‘ ) Steady state: • values of all variables associated with the process do not change with time. • At any given location in the process, the values of temperature, pressure, composition, flow rates, etc. are independent of time. Unsteady State: • process variables change with time Note: 1)Batch and semi-batch processes must be transient. 2) Continuous processes may be transient or steady-state. General Material Balance Equation input + generation – output – consumption = accumulation 1) batch process • material is placed in the vessel at the start and (only) removed at the end • no material is exchanged with the surroundings during the process. • Ex: baking cookies, fermentations, small-scale chemicals (pharmaceuticals) 2) continuous process • material flows into and out of the process during the entire duration continuously. • Ex: distillation processes input + generation – output – consumption = accumulation 3) semi-batch process • Material flow into the process but product is removed after the process is complete. • Ex: washing machine, fermentation with purge. Differential balance : • A balance at one particular instant in time -- deals with rates (for mass balances: mass per time [kg/s]). • best suited for continuous processes Integral balance : • deals with the entire time of the process at once (so it uses amounts rather than rates: e.g., mass NOT mass/time). • This form of the equation is best suited for batch or semi-batch operation. • simply integrating the differential balance over the length of time the system is operating (i.e., from tinitial to tfinal.) System: • The assemblage of elements which are tied together by common flow of material and/or information Parameter: • property of the process that can be assigned arbitrary numerical value ALSO called as constants/coefficient of the equation. Flux: • Any property per area per time . Ex: momentum flux Independent variable : • Quantities describing the system that can be varied by choice during experiment. EX: Time and Space Dependent variable: • Properties of a system which change when independent variables are altered in value • There is no direct control over the dependent variable • Calculated from the solution of model equations Note: 1) The relation between Independent and dependent variable is one of cause and effect. i.e y= f(x) 2) Independent variable measures cause and dependent variable measures effect. Types of Variable • Input & Output • Random • Exogenous – a constant value variable • Manipulated (In PDC) – Which is independent variable. Controlled Variable • State: variables which describes mathematical state of the dynamic system • Design : Externally specified variable • Process variables: mass transfer coeο¬cients, kinetic rate constants, and so forth. Modeling of a tank Fi & Fo = Flow rates of water in & out of the tank(m3/s) V= Volume (m3) h = height of the liquid in the tank(m) ο Constants • A= C/S area of tank(m2) • π = density (Kg/m3 ) • Temp remains constant ο Relationship : V= A *h ο Mass Balance:(Rate) input + generation – output – consumption = Accumulation Fi* π –Fo* π π(π∗π) = ππ‘ Fi* π –Fo* π = A* π = π(π΄∗β∗π) ππ‘ π(β) ππ‘ Fi –Fo = A π(β) ππ‘ οInformation Flow diagram Model Classification 1)Mechanistic or Phenomenological Model • Based on mechanism or underlying phenomena • Derivation is done from system phenomena or mechanism such as mass, heat and momentum transfer • Most mechanistic models also contain empirical parts (like rate expression or heat transfer relation) • Termed as white box models since mechanism are evident in model description • White box model is transparent or understandable • Ex: CSTR 2)Empirical or data based Model ο· Based on I/P and O/P data or Experimentation ο· Does not rely on knowledge of basic principles & mechanism OR Internal working ο· Termed as Black box model since little is known about mechanism ο· Ex: 1)Human brain 2) Flight recorder or Black box (I/p parameter is control instruction & O/P parameter is flight sensor , without the knowledge of internal working. • Large number of unknown parameters • Dangerous to extrapolate 3) Grey box Model • called as semi-empirical model • based on mechanistic & empirical model • Used widely in process engg. • Good versatility, can be extrapolated • Can be run in real-time 4) Stochastic Models • It contains model elements that are probabilistic in nature . • Not easy to work with • Uncertainty is introduced. • Ex: catalytic process in packed bed in which yield of product diminishes with decrease in activity of the catalyst. 5)Linear model Models where superposition principle applies ο Super position principle • If O/P , Y of a system or subsystem is completely determined by I/P , X . The system can be represented symbolically by Y= H*X , where H represents any form of conversion of X into Y. • Suppose two separate I/P are applied simultaneously to the system /subsystem so that • Y= H(X1+X2)= H(X1) +H(X2) = Y1 +Y2 • This is called additivity or superposition • Operator H is by definition a linear operator 1) 2) 3) 4) 5) 6) LUMPED Doesn’t vary with space but varies with time Various properties & state (dependent variable ) of the entire system can be considered to be homogenous Assumptions are made so that the problem can be converted to lumped parameter system It can be described by algebraic or Ordinary differential eqn. Ex-1: Equilibrium stage concept of distillation , extraction column Ex-2: Mixing tank(CSTR) DISTRIBUTED Varies with both space & time Detailed variation in behavior from point to point throughout the system. All the real system are under this category It can be described by either ODE or PDE Ex- 1: Tubular or packed bed reactor. (here radial temperature gradient occur . Hence necessary to use 2D or 3D distributed model) Ex-2: Mixing tank with baffles 7) Deterministic or Rigid Describes deterministic process Each variable can be assigned a definite fixed number There is no uncertainty Relatively easier than stochastic Not difficult to analyze & grasp Different classical techniques of mathematics are used like differential eqn.,Integral eqn. etc. A constant value is obtained 8) Ex- 1) 2) 3) 4) 5) 6) CSTR Stochastic or Probabilistic Probability distribution is needed Variables are not precisely known Uncertainty is introduced Not easy to work with Difficult to analyze and grasp It represents distribution of discreet and continuous variables & also sample distribution. Here it becomes necessary to fall back on statistical devices e.g., value of x is a±b with 95% probability. It means that in the long run the value of x will be greater than a+b or less than a-b in 5% of cases. Ex- contact catalytical process( Packed bed in which the yield of product diminishes with decrease in activity of catalyst as it ages with time. Classification of model - Based on Variation of Different Models • Physical models Ex: Model of ship/building, Pilot plant • Drawings & maps • Theories. Ex: Liquid drop theory • Mathematical equations • Analog models Ex: Electrical/Electronic and mechanical devices Note : If an engineer wishes to construct a model of a real process, then 3 types of model and combination of these 3 models will be used extensively 3 models are• Transport phenomena model based on physico-chemical principles • Population balance model. Ex: RTD studies or age distribution • Empirical models. Ex: Data fitting (Least square method), if input and output data is given a relation can be obtained. Step by step procedure for modeling 1) Define the goal: a) To have a specific design decision b) Provide numerical values i.e values to a parameter c) Establish functional relationship between variables d) Give required accuracy 2) Preparation of Information a) Sketch the process & Identify the system b) Identify the variable of interest (always the state variable) 3)Formulate the model a) Conservation of i) mass ii) heat iii)momentum b)Constitutive Relation ( Any mathematical description of the response of material to spatial gradient is called constitutive relation. They are postulated and cant be derived from fundamental principles) (i)Phase equilibrium(VLE, Raoults law, Henry’s law etc) (ii)Transfer equation • Newtons law/ Fouriers law/ Ficks law iii) Rate expression • −ππ΄ = 1 πππ΄ π ππ‘ iv) Equation of state • PV=nRT , π= ππ π π c) Rationalization of model d) Check the DOF • DOF = NV -NE • Case(i) NV=NE --------- System is exactly specified • Case(ii) NV-NE< 0, Hence no. of equation> no.of variable -------- System is over specified & no solution to the model exists • Case(iii) NV-NE> 0 ; When NV>NE, the system is underspecified .There can be infinite solution. Note: Situation where DOF>0 or DOF<0 should be converted to DOF=0 before we proceed for modeling. ο Explanation of DOF A+B=C (1) K= B/A (2) A= 1000 (3) C=2000 (4) K= 4 (5) Case(i) NV= 4 NE= 5 : DOF < 0 • Math problem is not solvable • System is over-specified hence no solution. • Situation results in incorrect formulation of design problem Case(ii) Relaxing eq(4), then there is single unique because DOF=0 Case(iii) DOF>0 ο· Relaxing eq(4) &(5), then there are infinite values for B,C,K ο· Assign value to one variable to make DOF=0 ο· System is underspecified f) Preferably convert the model into dimensionless form 4)Determine the solution a) Analytical b) Numerical 5)Analyze the results a) Check the results for correctness (i)Limiting and approximate answer (ii)Accuracy of the numerical method b)Interpretation of the results (i) Plot the solution (ii) Relate the results with the available data and the assumptions c)Evaluate the sensitivity d)Answer What-if questions 6)Validate the model a) Select the key values for validation b) Compare the experimental results. c) Compare with more complex models. Benefits of Process Modelling and Simulation 1) Economical Experimentation • Instead of using pilot plant, simulation is done using computer due to which the cost factor comes down drastically 2)Extrapolation • Possible to test extreme ranges with suitable model which is not possible with real plants 3) Study of commutability & evaluation of alternate policies a) New factor or elements can be introduced and old ones removed b) Simulation makes it possible to compare various proposed design and processes not in use. 4)Replication of experiments a) Simulation makes it possible to study the effect of changes of variables and parameter with reproducible results. b) Error can be introduced and removed at will. 5)Computer control • Study of closed loop and open loop controls will be easier 6)Test of sensitivity • It is done for cost parameter and base system parameter. Ex : a 10% increase in the input rate could have minimum effect or serious effect on plant performance. 7)Study of system stability • Stability of system and sub system to disturbances can be examined. Characteristics of model 1)Can be hierarchical. 2)Most models are imperfect 3)Cost & effort are required 4)Specific in nature 5)Can be used from one discipline to another if it is applicable 5)Simplify the model if required 6)Gives a lot of insight into the process & also leads to more experimentation and in-depth investigation Uses of Modelling 1)Engineering 2)Sciences 3)Economics 4)Warfare 5)Psychology 6)Cosmology Ex: related to Stars 7)Leisure. Ex: Hotel 8)Political Science. Ex: Exit polls Model application areas in chemical engg. 1)Process Design a)Feasibility analysis of novel design b) Analyzing the process interaction c) Waste minimization in design 2) Process control a) Analyzing the design for set point changes or disturbance b) Optimal start up and shut down policies c) Optimal control for multiproduct operation 3)Troubleshooting • Identify the likely cause or quality problem and process deviation 4)Process safety a)Detection of hazardous operating regimes b)Estimation of accidental release events c)Estimation of effects from release scenarios 5)Operator training a)Start up and shut down policies b) Emergency response training c) Routine operator training 6) Environmental impact a) Quantifying emission rates for specific design b) Dispersion prediction for air and water releases c) Estimating acute accidental effects( fire or explosion) Limitations /Pitfall/Disadvantages of modeling 1) Availability of data 2) Accuracy of data 3) Cannot Extrapolate 4) Mathematical model/ Tools for solving the model should not be complicated 5) Any process selected should be physically realizable