Mathematical Modeling of Chemical Processes Aisha Osman Mohamed Ahmed Department of Chemical Engineering Faculty of Engineering, Red Sea University
Chapter Objectives End of this chapter, you should be able to: 1. Develop unsteady-state models (dynamic models) of chemical processes from physical and chemical principles 2. Explain the rationale for dynamic models 3. Explain a general strategy for deriving dynamic models 4. Perform degrees of freedom analysis
What is a mathematical model of a physical process, and what do we mean when we talk about mathematical modeling? Why do we need to develop the mathematical model of a process you want to control? What is a steady-state?
Mathematical representation of a physical process = model of the process The activities leading to the construction of the model is referred to as modeling The behavior of a chemical process = its outputs
Mathematical Model (Eykhoff, 1974) A representation of the essential aspects of an existing system (or a system to be constructed) which represents knowledge of that system in a usable form Everything should be made as simple as possible, but no simpler
Design: Uses of mathematical models Exploring the sizing and arrangement of processing equipment for dynamic performance Studying the interactions of various parts of the process, particularly when material recycle or heat integration is used Evaluating alternate process and control structures and strategies Simulating start-up, shutdown, and emergency simulations and procedures
Plant operation: Troubleshooting and processing problems Aiding in start-up and operator training Studying the effects of and the requirements for expansion (bottle-neck removal) projects Optimizing plant operation It is usually much cheaper, safer, and faster to conduct the kinds of studies listed above on a mathematical model than experimentally on an operating unit.
Principles of Model Formulation The model equations are at best an approximation to the real process. Adage: All models are wrong, but some are useful Inherently involves a compromise between model accuracy and complexity The effort required to develop the model
Process modeling Both an art and a science. Requires creativity to make simplifying assumptions that result in an appropriate model Dynamic models of chemical processes consist of ODEs and/or PDEs, plus related algebraic equations
Modeling Approaches There are 3 types of modeling approaches: Physical/chemical (fundamental) Black box Semi-empirical
Physical/chemical (fundamental, global) Model structure by theoretical analysis Material/energy balances Heat, mass, and momentum transfer Thermodynamics, chemical kinetics Physical property relationships Model complexity must be determined (assumptions) May be expensive/time-consuming to obtain Can be computationally expensive (not real-time)
Good for extrapolation, scale-up Does not require experimental data to obtain (data required for validation and fitting) Theoretical models of chemical processes are based on conservation laws.
Mass Balance Conservation of Mass Conservation of Component i
Energy Balance Conservation of Energy
Total energy of a thermodynamic system, U tot For the processes and examples considered in this course, it is appropriate to make two assumptions: Changes in potential energy and kinetic energy can be neglected The net rate of work can be neglected
For these reasonable assumptions, the energy balance in Eq. 2-3 can be written as
Black box (empirical) Large number of unknown parameters Can be obtained quickly (e.g., neural network, fuzzy logic) Model structure is subjective Dangerous to extrapolate
Semi-empirical Compromise of first two approaches Model structure may be simpler Typically 2 to 10 physical parameters estimated (nonlinear regression) Good versatility, can be extrapolated Can be run in real-time linear regression nonlinear regression
Degrees of Freedom Analysis List all quantities in the model that are known constants (or parameters that can be specified) on the basis of equipment dimensions, known physical properties, etc. Determine the number of equations NE and the number of process variables, NV. Note that time t is not considered to be a process variable because it is neither a process input nor a process output. Calculate the number of degrees of freedom, NF = NV - NE.
Identify the NE output variables that will be obtained by solving the process model. Identify the NF input variables that must be specified as either disturbance variables (introduce extra NE for each disturbance) or manipulated variables (introduce extra NE for the control law eqn), in order to utilize the NF degrees of freedom.
A Systematic Approach for Developing Dynamic Models As an illustrative example: Consider the isothermal stirred-tank blending system as shown below. The volume of liquid in the tank can vary with time, and the exit flow rate is not necessarily equal to the sum of the inlet flow rates. Develop the dynamic model for the system to study the transient behavior of the process under set-point and disturbance changes.
Step 1: State the modeling objectives and the end use of the model. They determine the required levels of model detail and model accuracy. V(t) and x(t) as functions of inputs. Step 2: Draw a schematic diagram of the process and label all process variables.
Step 3: List all of the assumptions that are involved in developing the model. Try for parsimony; the model should be no more complicated than necessary to meet the modeling objectives. 1. Perfect mixing Valid for low-viscosity liquids with constant agitation. 2 important implications: i. There are no concentration gradients in the tank ii. The composition of the exit stream is equal to the tank composition 2. Constant density liquid
Step 4: Determine whether spatial variations of process variables are important. If so, a partial differential equation model will be required. No spatial variation since the tank is assumed to be perfectly mixed. Step 5: Write appropriate conservation equations (mass, component, energy, and so forth).
An unsteady-state mass balance for the blending system: or where w 1, w 2, and w are mass flow rates. The unsteady-state component balance is:
Step 6: Perform a degrees of freedom analysis (Section 2.3) to ensure that the model equations can be solved. 1 parameter: 7 variables (NV = 7): V, x, x 1, x 2, w, w 1, w 2 2 equations (NE = 2): Equations 2.6 and 2.7 NF = 7 2 = 5
From the variables, we can classify into 2 groups: Output variables : V, x (LHS of the equations) Input variables: x 1, x 2, w, w 1, w 2 (RHS of the equations) Only the outputs are the variables need to be determined in a system of 2 equations, hence no DOF left specified. exactly
Step 7: Simplify the model. Rearrange the equations so that the dependent variables (outputs) appear on the left side and the independent variables (inputs) appear on the right side. This model form is convenient for computer simulation and subsequent analysis.
For constant ρ, Eqs. 2-6 and 2-7 become: Equation 2-10 can be simplified by expanding the accumulation term using the chain rule for differentiation of a product: Substitution of (2-11) into (2-10) gives:
Substitution of the mass balance from (2-9) in (2-12) gives: After canceling common terms and rearranging (2-9) and (2-13), a more convenient model form is obtained:
Step 8: Classify inputs as disturbance variables or as manipulated variables. The input variables are classified as either disturbance or manipulated variables: 3 disturbance variables: x 1, x 2, w 1 2 manipulated variables: w, w 2
Summary of Blending Process The dynamic model in Eqs. 2-14 and 2-15 is in a convenient form for subsequent investigation based on analytical or numerical techniques Measure the inlet compositions (x 1 and x 2 ) and the flow rates (w 1, w 2 and w) as functions of time Specify the initial conditions for the dependent variables, V(0) and x(0) Determine the transient responses, V(t) and x(t)
Dynamic models of representative processes Stirred-Tank Heating Process Figure 2.3 Stirred-tank heating process with constant holdup, V
Assumptions: Perfect mixing The exit temperature T is also the temperature of the tank contents The liquid holdup V is constant because the inlet and outlet flow rates are equal The density ρ and heat capacity C of the liquid are assumed to be constant Temperature dependence is neglected Heat losses are negligible
Model Development For a pure liquid at low or moderate pressures, the internal energy, U int, is approximately equal to the enthalpy, H H depends only on temperature We assume that U int = H and where the caret (^) means per unit mass. A differential change in temperature, dt, produces a corresponding change in the internal energy per unit mass, where C is the constant pressure heat capacity.
The total internal energy of the liquid in the tank is: An expression for the rate of internal energy accumulation can be derived from Eqs. (2-16) and (2-17): Note that this term appears in the general energy balance of Eq. 2-5. Suppose that the liquid in the tank is at a temperature T and has an enthalpy,. Integrating Eq. 2-16 from a reference temperature T ref to T gives,
Without loss of generality, we assume that. Thus, (2-19) can be written as: For the inlet stream: Substituting (2-20) and (2-21) into the convection term of (2-5) gives: Finally, substitution of (2-18) and (2-22) into (2-5)
Degrees of freedom analysis: 3 parameters: V,, C 4 variables: T, T i, w, Q 1 equation: Eq. 2.23 So, N F = 4 1 = 3 Classification of variables: Output or CV: T Inputs: T i, w, Q where, DV = T i, w MV = Q
Block diagram
Home work 1 Repeat the above example considering variable holdup (i.e. non-constant volume) of the stirred heating tank.