You are on page 1of 21

Theoretical Models of Chemical Processes

1.Goals By the end of this chapter, the students should be able to do the following: a. Formulate dynamic models based on fundamental balances. b. Linearize nonlinear model equations.

2. Fundamentals Definition. A mathematical model of a process is a system of equations whose solution, given specific input data, is representative of the response of the process to a corresponding set of inputs. Mathematical models can be classified based on different criteria: 1. Theoretical and empirical models. 2. Steady state and dynamic models. 3. Lumped and distributed models. Mathematical models can be useful in different chemical engineering phases: 1. Research and development: determining chemical kinetic mechanisms and parameters from laboratory or pilot-plant reaction data; exploring the effects of different operating conditions for optimization and control studies; aiding in scale-up calculations. 2. Design: evaluating alternative process and control structures and strategies; simulating start-up, shutdown and emergency situations and procedures. 3. Plant operation: aiding in operators training, optimizing plant operation. Notice that modeling is performed to answer specific questions; thus, no one model is appropriate for all situations. 3. Modeling procedure 1. Define goals. Goal statement is a critical element of the modeling task since it determines the type of the model needed. The goal should be specific concerning the type of information

Chapter 2: Theoretical Models of Chemical Processes

needed; for example numerical values, semi quantitative information about system characteristics. What is the required decision?

Goal

What is the required variable?

How detailed the model is?

2. Prepare information. a. Sketch the process. b. Collect data. c. State assumptions. The model should be no more complicated than necessary to meet the modeling objectives. d. Define the system 3. Formulate the model. 1. Overall mass balance. 2. Component mass balance. 3. Energy balance 4. Determine the Solution. The resulted dynamic model will involve differential (and algebraic) equations, because of the accumulation terms, with initial conditions and some change to an input variable, i.e. forcing function. Depending on model complexity, model solution is obtained either analytically or numerically. 5. Results analysis The first phase is to evaluate whether the solution is correct. This can be partially verified by considering the following:

Chapter 2: Theoretical Models of Chemical Processes

a. The result satisfies initial and final conditions. b. Obeys assumptions. c. Sign and shape as expected. The second phase is the extensive study and interpretations of the obtained solution. Finally, the sensitivity of the results to changes in assumptions or data should be evaluated (what if analysis). 6. Validation Compare with empirical data. 4. Fundamental laws Consider the system shown in Figure 1.

Heat

Inlets Fi,i, Ti,i Ci,i, i,i

System

Oulets Fi,o, Ti,o Ci,o, i,o

Work
Figure 1. A general system and its interaction with outside world

1. Total mass balance {Accumulation of mass} = {mass in} {mass out} d ( V ) = i Fi j F j dt i:inlet j:outlet

2. Mass balance on component A {Accumulation of component mass} = {component mass in}{component mass out} {generation/consumption of component mass} dn A d (c AV ) = = c Ai Fi c Aj F j rAV dt dt i:inlet j:outlet

Chapter 2: Theoretical Models of Chemical Processes

3. Energy balance {Accumulation of internal, kinetic and potential energy}={flow of internal, kinetic and potential energy into system}-{flow of internal, kinetic and potential energy out of system}+{Heat added to the system}-{work done by the system on surrounding} d (U + K + P) = i Fi H i j F j H j Q W dt i:inlet j:outlet
5. Degrees of freedom in modeling

Question Consider the following system z + 2x + 3y = 5 4 z + 3x + y = 1

5 z + 10 x + 15 y = 25 Does this system have a unique solution? Answer No. Because, the number of variables is larger than the number of equations. To use a mathematical model for process simulation we must insure that the model equations, differential and algebraic, provide a unique relation among all inputs and outputs. For a system of large, complicated steady or dynamic model, there is a unique solution if the number of unknown variables equals the number of independent model equations. An equivalent way of stating this condition is to require that the degrees of freedom (DOF) be zero, that is: DOF = NV-NE NV represents the number of variables (unspecified inputs and outputs) that depend on the behavior of the system and are to be evaluated through the model equations. NE is the number of independent equations (both differential and algebraic). The degrees of freedom analysis separates modeling problems into three categories: 1. DOF = 0; the system is exactly specified and the set of equations has a solution. Note that this solution may not be unique for a set of nonlinear equation. 2. DOF < 0; the system is over-specified. In general no solution to the model exists. This is a symptom of an error in the formulation. The likely cause is either (1) considering a variable as a parameter or (2) including an extra dependent equation(s) in the model.

Chapter 2: Theoretical Models of Chemical Processes

3. DOF > 0; the system is underspecified. An infinite number of solutions to the model exist. The likely causes are (1) considering a parameter as a variable or (2) not including in the model all equations that determine the systems behavior. The steps in the degrees of freedom analysis are summarized in Table 1. Table 1. Degrees of freedom analysis

6. Examples

Example 1 The dynamic behavior of a (constant volume) mixing (blending) tank is to be modeled. The tank has been designed well with buffering and impeller size, shape and speed such that the concentration should be uniform in the liquid. Due to the low concentration of component A in the solvent, it can be assumed that the density of reactor contents is constant. As a second task, derive model equations for a variable volume system. Data: Fin = 0.085 m3/min; V = 2.1 m3; CA,in = 0.925 mol/m3. Solution: The goal is to study the dynamic behavior of the system. Thus, it is vital to write down all dynamic equations that describe the system. Assumptions: a. b. c. d. Constant volume mixer. Mixer contents are perfectly mixed. Heat of mixing is negligible, i.e. mixer temperature is constant. Density of mixer contents is constant.

Chapter 2: Theoretical Models of Chemical Processes

Sketch:
Fin CA,in

CA

Inputs: Fin and CA,in. Parameters: V, Outputs: F, CA Model Equations: Total mass balance: d dV d ( V ) =V + = Fin F dt dt dt Because of assumptions (a) and (d) dV = ( Fin F ) = 0 dt Fin = F
Component A mass balance: d (VC A ) = F (C A,in C A ) dt NV = CA and F NE = 2 DOF = NV NE = 2 2 = 0. Note, the liquid volume is constant when: 1. An overflow line is used in the tank as shown in the sketch for this example. 2. The tank is closed and filled to capacity. 3. A liquid-level controller keeps V constant by adjusting a flow rate.

Chapter 2: Theoretical Models of Chemical Processes

Example 2 A typical liquid storage process is shown in the figure below. qi and q are volumetric flow rate. There are three important variations of the liquid storage process. Discuss these variations.

qi

h q A

Solution: 1. The inlet or outlet might be constant. The outlet might be maintained by a constant speed, fixed volume pump. An important consequence of this configuration is that the outlet flow rate is completely independent of the head in the tank. The tank operates as flow integrator. dh A = q i q, Note that right-hand side is constant dt It can be proved that the solution for this equation is (q q ) h = ho + i t A Interestingly, liquid height in the tank might linearly decrease or increase. This will make the tank run empty or flood respectively. Notice that the output grows (decreases) linearly with time in unbounded fashion (the figure below). Thus

y /

as

2. The tank exit line may function simply as a resistance to flow from the tank or it may contain a valve that provides significant resistance to flow at a single point. The flow may be assumed to be linearly related to the deriving force, liquid head, in analog to Ohms low: q = driving force for flow/resistance to flow

Chapter 2: Theoretical Models of Chemical Processes

y(t)

qi q A
q= 1 h Rv

Rv is the resistance of the line. The use of this equation yields a first-order linear differential equation: dh 1 A = qi h dt Rv The solution h(t) can be found analytically in cases where qi(t) can be specified as simple functions of time.
3. A more realistic expression for flow can be obtained when a valve has been placed in the exit line. The pressure difference deriving flow through the valve is P = P Pa

P is related to q, q = Cv P Pa Where Cv, called valve coefficient, depends on the particular valve used and its flow rating. Here we assume that the flow discharges at ambient pressure Pa and that the upstream pressure P is the pressure at the bottom tank P = Pa + gh The combination of these equations results in the following differential equation dh A = qi Cv gh dt The liquid storage processes discussed above could be operated by controlling the level in the tank or by allowing the level to fluctuate without attempting to control it. In the later case, it may be of interest to predict weather the tank would overflow or run dry for particular variations in the inlet and outlet flow rates. Hence, the dynamics of the process may be important even when automatic control is not utilized.

Chapter 2: Theoretical Models of Chemical Processes

Example 3
Consider the stirred-tank heating system shown in the Figure below. The liquid inlet stream consists of a single component with a mass flow rate w and an inlet temperature Ti. the tank contents are agitated and heated using an electrical heater that provides a heating rate, Q. Discuss the development of a dynamic model for this system based on constant liquid hold up assumption first; then discuss the effect of relaxing this assumption on the dynamic model.

Solution.
Assumptions: 1. Perfectly mixed system. 2. Liquid hold-up is constant. 3. The density and heat capacity of the liquid are assumed to be constant. Thus, their temperature dependence is negligible. 4. Heat losses are negligible. 5. The net rate of work is negligible compared to the rates of heat transfer and convection.

Case 1: constant hold up


Inputs: wi, Ti, Q Parameters: V, C, Outputs: w, T Total mass balance

Chapter 2: Theoretical Models of Chemical Processes

d ( V ) = 0 = wi w dt Energy balance For a pure liquid at low or moderate pressure, the internal energy is approximately equal to the enthalpy, U H, and depends only on temperature. d (mH ) dH dT =m = VC = w( H i H out ) + Q dt dt dt = w C (Ti Tref ) C (T Tref ) + Q

= wC (Ti T ) + Q

NV = 2, NE = 2. DOF = NV-NE = 2-2 = 0

Case 2: variable hold-up


Total mass balance
d ( V ) = wi w dt dV = wi w dt Energy balance d (mH ) d (VH ) dH dV = = [V +H ] dt dt dt dt = wi H i Hw + Q Note that dH/dt = CdT/dt. Substituting this equation into energy balance equation and using mass balance give:

d (VH ) dT = C (T Tref )( wi w) + CV dt dt = wi H i wH + Q = wi C (Ti Tref ) wC (T Tref ) + Q

Rearranging this equation gives wi dT = (Ti T ) + Q dt V C

Chapter 2: Theoretical Models of Chemical Processes

10

This example has demonstrated that process models with variable hold-up can be simplified by substituting the overall mass balance into the other conservation equations. Inputs: wi, Ti, Q Parameters: C, Outputs: V, T, w DOF = 3-2 = 1 ???... Total mass and energy balance equations provide a model that can be solved for the two outputs (V and T) if the two parameters (C, ) are know and the four inputs (w, wi, Ti and Q) are known functions of time. Example 4 The system to be considered in this example is a CSTR. The reactor is fed with components A and B with inlet concentrations CAo and CBo , in mol/m3, respectively. Consider a simple first-order, irreversible exothermic chemical reaction where chemical A species reacts to form species B:

A k B Assuming constant inlet flow rate, qi, and the reactor operates with constant mass holdup, write the equations describing the system.
Solution: Assumptions: Reactor is well-mixed. Constant volume reactor. Shaft work is negligible. Heat lose to the atmosphere is negligible. Enthalpy is only a function of temperature. Jacket volume is constant Heat capacity is constant. Thermal capacitance of the coil (reactor jacket) wall is negligible.

Sketch:

Chapter 2: Theoretical Models of Chemical Processes

11

Variables: Inputs: Fin, CA,in, CB,in, in, Tin Outputs: F, CA,, CB,, T Parameters: k, H, U, Cp,A, Cp,B (or hA, hB), Overall mass balance dV = ( Fin F ) = 0 dt Fin = F Mass balance on component A d V (C A ) = F (C A,in C A ) rAV dt rA = kC A

E k = k o exp RT We can write another balance equation for B d V (C B ) = F (C B ,in C B ) + rAV dt Or it can be calculated using the following equation M wA C A + M wB C B = Since the system is binary the overall mass balance and only one component continuity equation is required.
Chapter 2: Theoretical Models of Chemical Processes 12

Energy balance mH d( ) = ( Fh) in ( Fh) + Q + W dt m = V H = C p (T Tref ) ) = ( FC p (T Tref ))in ( FC p (T Tref )) + ( H )VrA + QJ dt Taking the overall mass balance and the assumptions into account, the above equation can be simplified as follows dT VC p = FC p (Tin T ) + (H )VrA + QJ dt d( Reactor jacket: 1. In the first case coolant flow is high. Thus, its temperature will be assumed to be constant (TJ). dT VC p = FC p (Tin T ) + (H )VrA + UA(TJ T ) dt U is overall heat transfer coefficient A is heat transfer area.
2. Perfectly mixed cooling jacket. We assume that the temperature everywhere in the jacket (TJ). Jacket energy equation dh J VJ J = FJ J (hJo h) + UA(T TJ ) dt OR dT J VJ C pJ J = FJ J C pJ (TJo T ) + UA(T TJ ) dt The relationship between area and holdup (V) needs to be estimated. If the reactor is a flat-bottomed vertical cylinder with diameter D and if the jacket is only around outside, not around the bottom: V A=4 D 3. Plug flow cooling jacket. In many jacketed vessels the rise in water temperature is significant and the coolant flow is more like plug flow than perfect mix. In this case, an average jacket temperature (TJA) is used:

VC p (T Tref )

Chapter 2: Theoretical Models of Chemical Processes

13

TJO + TJexit (*) 2 The average temperature is used in the heat transfer equation and to represent the enthalpy of jacket material. Jacket equation becomes: dT J VJ C pJ JA = FJ J C pJ (TJo TJexit ) + UA(T TJA ) dt This equation is integrated to obtain TJA at each time instant in time. Equation (*) is used to calculate TJexit also as a function of time. TJA = DOF NV = 4; NE = 3
Another case

Note that in the above examples, wall temperature is assumed equal to the temperature of the system which is in touch with. This simplifies the modeling. Consider a system with wall that has large thermal capacitance. Furthermore, assume that the wall has a uniform temperature, Tw. Consider the stirred-tank system with steam heating coil. We assume that the thermal capacitance of the liquid condensate is negligible compare to the thermal capacitances of the tank liquid and wall of the heating coil. This is a realistic assumption as long as a stream trap is used to remove condensate from the coil as it is produced. As a result, the dynamic model consists of energy balances on the liquid and heating coil wall: dT = FC p (Tin T ) + ( H )VrA + h p Ap (Tw T ) dt dT mwC pw w = hs As (Ts Tw ) h p Ap (Tw T ) dt Note that it is not possible to consider the overall heat transfer coefficient; instead, heat transfer coefficient, hp, is used. Subscripts p and w refer to the reactor side and wall respectively. However, the system is not well-specified, what about Ts, which is steam temperature. This temperature can be fixed when condensate pressure (Ps) is known, because both variables are related by thermodynamic relation, i.e. Ts = f(Ps). Thus, the dynamic model contains three temperature outputs (Ts, Tw and T). Two of them are determined by dynamic equations and the third using an algebraic equation.

VC p

Chapter 2: Theoretical Models of Chemical Processes

14

Example 5 Suppose a mixture of gases is fed into the reactor sketched in the figure below. The reactor is filled with reacting gases which are perfectly mixed. A reversible reaction occurs: A k1 B B k 2 A The forward reaction is 1.5th-order in A; the reverse reaction is first order in B. The mole fraction of reactant A in the reactor is y. the pressure inside the vessel is P. Both P and y can vary with time. The system is assumed to be isothermal. Prefect gases are also assumed. The feed stream has a density o and a mole fraction yo of reactant A. it is volumetric flow rate is Fo. The flow out of the reactor passes through a control valve into another vessel which is held at a constant pressure PD. Flow through the control valve is calculated by

F = Cv

P PD

With Cv is the valve sizing coefficient.

Solution:
Sketch Fo, yo o V T P y F, y PD

Assumptions:

Well-mixed system. Gas fills the whole volume of the reactor; thus, system volume can be assumed to be constant. Isothermal constant. Ideal gas low is applicable

Variables: Inputs: Fo, yo, T, PD, CAo, o Outputs: F, y, , CA, P Parameters: V, MA, MB, Cv, k1, k2, R

Chapter 2: Theoretical Models of Chemical Processes

15

Overall mass balance: d = o Fo F V dt Component A continuity dC A V = FoC Ao FC A Vk1C 1.5 + Vk 2C B A dt Density varies with pressure and composition. It can be calculated using the ideal gas low. PV = nRT n P = V RT Multiplying both terms by the molecular weight of the average one in case of mixtures n P M= M V RT n M V PM P = = [ yM A + (1 y ) M B ] RT RT M is the average molecular weight. The concentration of reactant in the reactor is: Py CA = RT

Example 6
Derive a mathematical model that describes the removal of sulfur dioxide (SO2) from combustion gas by use of a three-stage absorption unit.

Solution
Assumptions: 1. Due to the extensive mixing we can assume that the component to be absorbed is in equilibrium between the gas and liquid streams leaving each stage i. a simple relationship is usually assumed. For stage i:

y i = axi + b
2. Constant liquid hold up. 3. Perfect mixing on each stage. 4. Neglect gas hold up.

Chapter 2: Theoretical Models of Chemical Processes

16

5. Molar liquid and gas flow rates are unaffected by the absorption because the changes in concentration of the absorbed component are small. Thus, both flow rates are approximately constant. Sketch:
L, xi+1 G, yi

Stage i L, xi G, yi-1

Variables: Inputs: xf, yf, G, L Parameters: a, b, H Outputs: x1, x2, x3, y1, y2, y3 Balances: Overall mass balance is useless because of assumption 5. Component material balance in stage i, gives dx H i = Gyi 1 + Lxi +1 Gyi Lxi dt = G ( yi 1 yi ) + L( xi +1 xi ), i = 1,2,3 Substituting the equilibrium equation into this equation gives dx H i = aGxi 1 ( L + aG ) xi + Lxi +1 dt Dividing by L and substituting = H/L (the stage liquid residence time), = aG/L (the stripping factor), and K = G/L (the gas-to-liquid ratio), the following model is obtained for the three-stage absorber:

dx1 = K ( y f b) (1 + ) x1 + x2 dt dx 2 = x1 (1 + ) x2 + x3 dt dx 3 = x2 (1 + ) x3 + x f dt

Chapter 2: Theoretical Models of Chemical Processes

17

7. Linearization

7.1 Introduction
Linearization is a process by which we approximate nonlinear systems with linear ones. It is widely used in the study of process dynamics and design of control systems for the following reasons: 1. We can have analytical solutions for linear systems. Thus, we can have a complete picture and general picture of a processes behavior independently of the particular values of the parameters and input variables. This is not possible for nonlinear systems, and computer simulation provides us only with the behavior of the system at specified values of inputs and parameters. 2. All the significant developments toward the design of effective control systems have been limited to linear processes. The first question to be answered is just what a linear differential equation is. Basically, it is one that contains variables only to the first power in any one term of the equation.

Linear example dx a1 + ao x = f (t ) dt Where ao and a1 are constants or functions of time only, not of dependent variables or their derivatives. Nonlinear examples dx + ao x 0.5 = f (t ) dt dx a1 + ao e x = f (t ) dt dx a1 1 + ao x1 (t ) x2 (t ) = f (t ) dt Where x1 and x2 are both dependent variables. a1 7.2 Linearization of systems with one variable.
Consider the following nonlinear differential equation, modeling a given process: dx (**) = f ( x) dt Expand the nonlinear function f(x) into a Taylor series around the point xo and take
Chapter 2: Theoretical Models of Chemical Processes 18

2 2 df x xo d f ( x xo ) + 2 f ( x ) = f ( xo ) + dx 2! dx xo 1! xo

dn f +L+ n dx

( x xo ) n +L n! xo

If we neglect all terms of order two and higher, we take the following approximation for the value of f(x):
df f ( x) f ( xo ) + ( x xo ) dx xo

In Figure 1 we can see the nonlinear function f(x) and its linear approximation around xo. From the same picture it is also clear that the linear approximation depends on the location of the point xo around which we make the expansion into a Taylor series. Compare the linear approximation of f(x) at the points xo and x1. The approximation is exact only at the point of linearization.

f(x)
df f (x) f (xo) + (xxo) dxxo

f(xo)

f(x)

xo

x1

In Equation (**), replace f(x) by its linear approximation given by the last equation above and take
dx df = f ( xo ) + ( x xo ) dt dx xo

Example
Consider the tank system shown in the figure below.
Chapter 2: Theoretical Models of Chemical Processes 19

Fi

The total mass balance yields

dh = Fi F dt Consider A

F = h,

= constant

The resulting total balance yields a nonlinear dynamic model, dh + h = Fi dt

Let us develop the linearized approximation for this nonlinear model. The only nonlinear tem is h , taking the Taylor series expansion around a point ho:
d2 (h ho ) 2 d h = ho + h (h ho ) + 2 h +L 2! dh h =ho dh h = ho Neglecting the terms of order two and higher, we take 1 h ho + (h ho ) 2 ho By introducing this equation in the nonlinear dynamic system dh A + h = Fi ho dt 2 ho 2 Let us compare the linearized approximate model to the nonlinear one. Assume that the tank is at steady state with a liquid level ho. Then, at t = 0, the supply of liquid to the tank is stopped, while we allow the liquid to flow out. Curve A is the solution of the nonlinear
Chapter 2: Theoretical Models of Chemical Processes 20

dynamic equation and curve B is the solution of the linearized dynamic model. Notice that the two curves are very close to each other for a certain period of time. This indicates that the linearized model approximates well the nonlinear model at the beginning. As the time increases and the liquid level continues to fall, its value h diverts more and more from the initial value around which the linearized model was developed. It is clear from the figure that as the difference h-ho increases; the linearized approximation becomes progressively less accurate. h ho

B (linearized model) A t

Chapter 2: Theoretical Models of Chemical Processes

21

You might also like