30
Process Modeling Improving or understanding chemical process operation is a major objective for developing a dynamic process model

Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

Process Modeling

Improving or understanding chemical process operation is a

major objective for developing a dynamic process model

Page 2: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

2

Balance equations

• Steady-state balance equations

• Dynamic balances

mass or energy mass or energy

entering leaving 0

a system a system

− =

rate of mass or energy mass or energy mass or energy

accumulation in entering leaving

a system a system a system

= −

or or dM dE dN

dt dt dt

Specify the system

• Microscopic

• Macroscopic

Page 3: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

3

• Integral balances and Instantaneous balances

or

in out

in in out out

dMm m

dt

dVF F

dt

ρ ρ ρ

= −

= −

ɺ ɺ

Integral balances Instantaneous balances

t t t t

in outt t tt t

M M m dt m dt+ +

+− = −∫ ∫

△ △

△ɺ ɺ

(F: volumetric flowrate)

(useful for distributed parameter system)

( )inm tɺ

Page 4: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

4

Material balances

Ex1. Liquid Surge Tank

rate of change of mass flowrate of mass flowrate of

mass of water in tank water into tank water out of tank

= −

Develop a model that describes how the volume of tank varies as a function of time.

Page 5: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

5

Assume 's are constant.

In order to solve the problem, we must specify the inputs:

( ) & ( ) and the initial condition (0).

Express the tank volume as , we obtain:

i i

i

i

i

dVF F

dt

dVF F

dt

F t F t V

V Ah

Fdh

dt A

ρ ρ ρ

ρ

= −

= −

=

If we also know the flowrate out of the tank is proportional to

the height of liquid in the tank ( ), we have:

where state variable= the

= the

& = the

input vari

able

p

i

i

F

A

F

F

h

dh

h

h

d A A

F

A

t

β

β

β= −

=

arameters

V = state variableFi, F = input variables

• It may be desirable to have tank height, h, as the state variable

Modeling equations and variables

depend on assumptions and objectives

Page 6: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

6

Ex 2. An isothermal chemical reactor

2A B P+ →

Overall material balance

(1)

Assume = .

(2)

i i

i

i

dVF F

dt

dVF F

dt

ρ ρ ρ

ρ ρ

= −

= −

Develop a model that describes how the reactor concentration of each species

varies as a function of time.

Page 7: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

7

Recall the stoichiometric equation: 2 .A B P+ →

Component material balances

It is convenient to work in molar units when writing components

balances, particularly if chemical reactions are involved.

, with - (3)

, with = -2 (4)

, with (5)

Ai Ai A A A A B

Bi Bi B B B A B

Pi Pi P P P A B

dVCFC FC Vr r kC C

dtdVC

FC FC Vr r kC Cdt

dVCFC FC Vr r kC C

dt

= − + =

= − +

= − + = +

Page 8: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

8

Expanding the LHS of Eq. 3.

(6)

Combine Eqs 2, 3 and 6:

( ) (7)

Similarly, we have:

( ) 2

( )

A AA

iAAi A A B

iBBi B A B

iPPi P A B

dVC dC dVV C

dt dt dt

FdCC C kC C

dt V

FdCC C kC C

dt VFdC

C C kC Cdt V

= +

= − −

= − −

= − + V, CA, CB, CP = state variablesFi, F, CAi, CBi, CPi= input variablesk = parameter

Page 9: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

9

B

If the species B is maintained in a large excess,

i.e., C constant, what are the resultant equations? ≈

CA can be solved independently

Simplifying Assumptions

• Assume a constant volume

0 reduce one equationdV

dt= ⇒

1 1- - whereA A B A Br kC C k C k kC= ≈ =

0BdC

dt=

1( )iAAi A A

FdCC C k C

dt V= − −

1( )iPPi P A

FdCC C k C

dt V= − +

The resulting equations are

Q:

( )1 Bk k C=

Page 10: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

10

Ex 3. Gas Tank

Assumption: ideal gas law (IG)

3 or ( molar volume, e.g., cm /mol)

( / ) or

Assume T=constant,

or ( )

i i

i i

PV nRT Pv RT v

dn d PV RTq q q q

dt dt

V dP dP RTq q q q

RT dt dt V

= = =

= − = −

= − = −

Develop a model that describes how the pressure in the tank varied with time

P = state variableqi, q = input variablesV, T, R = parameters

(qi, q : molar rate)

Page 11: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

11

Constitutive Relationships (used in Ex.1 - 3)

- The required relationships, more than simple material balances, to

define the modeling equations.

• Gas Law

3

2

IG law:

( molar volume, e.g., cm /mol)

VDW (van der Waal's) equation of state:

( )( )

Pv RT v

aP v b RT

v

= =

+ − =

Page 12: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

12

• Chemical reaction kinetics

reaction kinetics: A+2B C+3D

reaction rate (rate per unit volume, e.g., mol/(volume*time))

( )

where

=rate of reaction of A (mol A/(volume*time)

= reaction rate constant (e.g., (volume/mol

A A B

A

r k T C C

r

k

= −

)/time)

=concentration of i (mol i/volume)iC

/0

0

Arrhenius rate expression:

( )

where

= reaction rate constant ((volume/mol)/time)

=frequency factor or preexponential factor (same unit as )

=activation energy (cal/gmol)

=ideal gas co

E RTk T k e

k

k k

E

R

−=

nstant (1.987 cal/(gmol K))

=absolute temperature (K or R)T

⋅�

rB = 2rA = -2kCACB

rC = -rA = kCACB

rD = -3rA = 3kCACB

Page 13: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

13

• Phase Equilibrium

Vapor Liquid Equilibrium (VLE)

where

= vapor phase mole fraction of component

= liquid phase mole fraction of component

= equilibrium constant for component

Ideal binary VLE using re

i i i

i

i

i

y K x

y i

x i

K i

=

1

2

lative volatility ( 1)

(based on light component)

1 ( 1)

K

K

xy

x

α

αα

= >

=+ −

Ki = f (C, T)

A constant relative volatility assumption is often made

Page 14: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

14

• Heat transfer

2

Rate of heat transfer

where

= rate of heat transfer from hot fluid to cold fluid (kJ/s)

= overall heat transfer coefficient (kJ/(s m K))

(function of fluid properties and velocities)

Q UA T

Q

U

A

= ∆

⋅ ⋅

2= heat transfer area (m )

= temperature difference (K)T∆

through a vessel wall separating two fluid(a jacketed reactor)

Page 15: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

• Flow through a valve

15

Liquid flow through a valve

( ). .

where

= volumetric flowrate (gallon per minute, GPM)

= valve coefficient

= fraction of valve opening (0 x 1; stem position)

= pressure drop across the

vv

v

v

PF C f x

s g

F

C

x

P

∆=

≤ ≤∆ valve (psi)

. . = specific gravity

( ) = flow characteristic (0 ( ) 1)

s g

f x f x≤ ≤

1

linear ( )

quick-opening ( )

equal-percentage ( ) x

f x x

f x x

f x α −

=

==

50α =

Page 16: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

16

Material and energy balances

• Necessary when thermal effect is important

• Basics

2

or

where

(kinetic energy)2 (potential energy)

For flowing systems (work with enthalpy)

1or since

where

enthalpy per mass

internal energy

TE U KE PE TE U KE PE

mvKE

PE mgh

PH U PV H U PV U ρ

ρ V

H

U

= + + = + +

=

=

= + = + = + =

== per mass

volume per massV =

(per mass)

(usually neglected when there is thermal

effect; two orders of magnitude less than

internal energy)

Page 17: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

17

• Example

accumulation = in - out

i i

dVF F

dt

ρ ρ ρ= −

Material balance

Page 18: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

18

Energy balance

accumulation = in by flow – out by flow + in by heat transfer

+ work down on system

The total work done on the system consists of shaft work and flow work:

(1)

Neglect the kinetic and potential energy:

(2)

i T i i i T

i i i T

T s i i

dTETE TE Q W F TE F TE Q W

dt

dUF U F U Q W

dt

W W F P FP

ρ ρ

ρ ρ

= − + + = − + +

= − + +

= + − (3)

Substitute Eq 3 into Eq 2:

( ) ( ) (4)ii i i s

i

PdU PF U F U Q W

dtρ ρ

ρ ρ= + − + + +

Page 19: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

19

Since and neglects , Eq 4 can be rewritten as:

( ) ( ) (5)

Since is constant and does not change much

(good assumption for liquid system) , Eq 5 becomes:

s

ii i i

i

H U PV W

PdH dPV PF U F U Q

dt dt

V P

dH

d

ρ ρρ ρ

= +

− = + − + +

( )

( )

(6)

The definitions for and are:

(7)

Select an arbitrary reference temperature and

assume the heat capacity is constant

ref

i i i

T

p p ref

T

i p i ref

F H F H Qt

H H

H V H

H(T) c dT c T -T

H c T -T

ρ ρ

ρ

= − +

=

= =

=

(8)

Page 20: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

20

Eq. 6 becomes:

( )( ) ( ) (9)

Assume constant density and volume (so ).

( ) (10)

(11( ) )

p refi i p i ref p ref

i

p p i

ip

dV C T TF C T T F C T T Q

dtF F

dT F QT T

dTV C F C T T Q

d V V C

d

t

t

ρ

ρρ ρ

ρ ρ

−= − − − +

=

= − +

= − +

Assumptions: 1. Neglect kinetic and potential energy.

2. Ignore the change in PV.

3. Cp is not a function of temperature.

4. V is constant.

5. ρ is constant.

Page 21: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

21

Distributed parameter system

• Tubular reactor

Mole balance of species A (assuming a first-order reaction)

( ) | ( ) | [( | | ) ]

Using the mean value theorem of integral and dividing by ,

( )[ | | ]|

t t

A t t A t A V A V V A

t

A t t A tA V

V C V C FC FC kC V dt

t

V C CFC F

t

+∆

+∆ +∆

+∆

∆ − ∆ = − − ∆

∆∆ − = −

|

Dividing by and letting and go to zero,

with and , we have:

A V V A

A AA

z

A z AA

C kC V

V t V

C FCkC

t VdV Adz F Av

C v CkC

t z

+∆ − ∆

∆ ∆ ∆∂ ∂= − −∂ ∂

= =∂ ∂= − −∂ ∂

V∆

V V+ ∆V

( )mean value theorem of integral

( ) ( )b

af t dt f x b a= −∫

Page 22: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

22

Similarly, the overall material balance can be found as:

If the density is constant: constant

To solve the problem, we must know initial condition

and boundary condition

z

z

A Az A

v

t zv

C Cv kC

t z

ρρ ∂∂ = −∂ ∂

=∂ ∂= − −∂ ∂

0

.

( , 0) ( )

(0, ) ( )A A

A Ain

C z t C z

C t C t

= ==

Page 23: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

23

Dimensionless Form

• Models typically contain a large number of parameters and

variables that may differ by several orders of magnitude.

• It is often desirable to develop models composed of

Dimensionless parameters and variables.

( )

,0

Consider a constant volume, isothermal CSTR modeled

by a simple 1st order reaction:

( )

Defining / , we find:

( )

Let .

( )( )

AAf A A

A Af

f

res

f

dC FC C kC

dt Vx C C

dx F Fx k x

dt V Vt t t V F

dx dx F dx F Fx k x

Vdt V d V VdF

τ

ττ

= − −

= − +

= =

= = = − +⋅

,0 steady-state feed concentration of AAfC =

,0f Af Afx C C=

residence timerest V F= =

Page 24: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

24

One obtains:

(1 ) (1 )

( ) is a dimensionless term and which is also /

Damkholer num

know

ber (D

n as

a).

(1 )

f f

f

dx Vkx x x x

d FVk F

dxx

k

F V

Da xd

τ

τ

= − + = − +

= − +

Remarks: This implies a single parameter, Da, can be used to characterize

the behavior of all 1st order, isothermal chemical reactions.

Explicit solution

Explicit solutions to nonlinear differential equations can

rarely be obtained (except for few examples).

iFdh h

dt A A

β= − If there is no inlet flow, …

Page 25: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

25

General form of dynamic models

1 1 1 1

2 1 1 1

1 1 1

General models consist of a set of 1st order, nonlinear ODEs.

(often called as state space equation)

( , , , , , , , , )

( , , , , , , , , )

( , , , , , , , ,

h

s

)

w ere

n m r

n

n m r

i

m r

n

x f x x u u p p

x f x x u u p p

x f x x u u

x

p p

==

=

=

ɺ ⋯ ⋯ ⋯

ɺ ⋯ ⋯ ⋯

ɺ ⋯ ⋯ ⋯

tate variables

input variable

paramete s

s

ri

i

p

u

==

Page 26: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

26

• State variables

A state variable arises naturally in the accumulation term of a

dynamic material or energy balance.

(e.g. temperature, concentration )

• Input variables

A input variable normally must be specified before a problem

solved or a process can be operated. Input variables are often

manipulated to achieve desired performance.

(e.g. flowrates, compositions, temperatures of streams )

• Parameters

A parameter is typically a physical or chemical property value that

must be specified or known to solve a problem.

(e.g. density, reaction rate constant, heat-transfer coefficient)

Page 27: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

27

• Vector notation

General models consist of a set of 1st order ODEs.

( )

where

state variables

input variables

parameters

The above equation can also be used to solve steady-state problems.

0 ( ) 0

The s

=

===

= ⇒ =

x f x,u,p

x

u

p

x f x,u,p

ɺ

ɺ

teady-state solutions are often used initial conditionas the

for O

s

DEs.

Page 28: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

28

• State variable form for Ex.2

i

dVF F

dt= −

( )iAAi A A B

FdCC C kC C

dt V= − −

( ) 2iBBi B A B

FdCC C kC C

dt V= − −

( )iPPi P A B

FdCC C kC C

dt V= − +

( )

( ) 2

( )

i

iAi A A B

A

iB Bi B A B

iPPi P A B

F FVF

C C kC CC VF

C C C kC CVFC C C kC CV

− − − = − − − +

ɺ

ɺ

ɺ

ɺ

( )( )( )( )

1 21

13 2 1 2 3 12

12

14 3 1 2 3 33

14

14 5 4 1 2 3

1

( ) , ,

, ,

( ) 2 , ,

, ,( )

u ux

uu x p x x fx

xf

uu x p x x fx

xf

ux u x p x x

x

− − − = = − − − +

x u p

x u p

x u p

x u p

ɺ

ɺ

ɺ

ɺ

4 states

5 inputs

1 parameter

Page 29: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

29

• Homework #1

1. Irreversible consecutive reactions A�B�C occur in a jacked, stirred-tank reactor

as shown in Figure. Derive a dynamic model based on the following assumptions,

and indicate the state variables, input variables, parameters.

(i) The contents of the tank and cooling jacket are well mixed. The volumes of

material in the jacket and in the tank do not vary with time.

(ii) The reaction rates are given by

(iii) constant physical properties and heat transfer coefficient can be assumed.

1

2

1 1 1

2 2 2

, heat of reaction

, heat of reaction

E RTA

E RTB

r k e C H

r k e C H

= = ∆

= = ∆

Page 30: Process modeling - ntut.edu.twjcjeng/Process modeling.pdf · 2011-09-19 · Process Modeling Improving or understanding chemical process operation is a major objective for developing

30

• Homework #1

2. Consider a liquid flow system consisting of a sealed tank with noncondensible gas

above the liquid as shown in Figure. Derive a dynamic model relating the liquid

level h to the input flow rate qi. Is operation of this system independent of the

ambient pressure Pa? What about for a system open to the atmosphere?

You may make the following assumptions:

(i) The gas obeys the ideal gas law. A constant amount of (mg /M) moles of gas are

present in the tank.

(ii) The operation is isothermal.

(iii) A square root relation holds for flow through the valve ( ).vq C P= ∆