Process modeling.pdf

Embed Size (px)

Citation preview

  • 7/30/2019 Process modeling.pdf

    1/30

    Process Modeling

    Improving or understanding chemical process operation is a

    major objective for developing a dynamic process model

  • 7/30/2019 Process modeling.pdf

    2/30

    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 ordM dE dN

    dt dt dt

    Specify the system Microscopic

    Macroscopic

  • 7/30/2019 Process modeling.pdf

    3/30

    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 out t t t

    t t

    M m dt m dt

    + +

    + =

    (F: volumetric flowrate)

    (useful for distributed parameter system)

    ( )inm t

  • 7/30/2019 Process modeling.pdf

    4/30

    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.

  • 7/30/2019 Process modeling.pdf

    5/30

    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

    Fdhdt 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

    FA

    F

    F

    h

    dh

    h

    h

    d A A

    F

    A

    t

    =

    =

    arameters

    V= state variable

    Fi, 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

  • 7/30/2019 Process modeling.pdf

    6/30

    6

    Ex 2. An isothermal chemical reactor

    2A B P+

    Overall material balance

    (1)

    Assume = .

    (2)

    i i

    i

    i

    dV

    F Fdt

    dVF F

    dt

    =

    =

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

    varies as a function of time.

  • 7/30/2019 Process modeling.pdf

    7/30

    7

    Recall the stoichiometric equation: 2 .A B P+

    Component material balances

    It is convenient to work in molarunits 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 C dt

    dVCFC FC Vr r kC C dt

    = + =

    = +

    = + = +

  • 7/30/2019 Process modeling.pdf

    8/30

    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 dV V C

    dt dt dt

    FdCC C kC C

    dt V

    FdCC C kC C

    dt V

    FdCC C kC C

    dt V

    = +

    =

    =

    = +V, CA, CB, CP = state variables

    Fi, F, CAi, CBi, CPi= input variablesk= parameter

  • 7/30/2019 Process modeling.pdf

    9/30

    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 B

    r kC C k C k kC = =

    0BdC

    dt=

    1( )iA

    Ai 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=

  • 7/30/2019 Process modeling.pdf

    10/30

    10

    Ex 3. Gas Tank

    Assumption: ideal gas law (IG)

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

    ( / )or

    Assume T=constant,

    or ( )

    i i

    i i

    PV nRT Pv RT v

    dn d PV RT q q q qdt dt

    V dP dP RT q q q q

    RT dt dt V

    = = =

    = =

    = =

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

    P = state variable

    qi, q = input variables

    V, T, R = parameters

    (qi, q : molar rate)

  • 7/30/2019 Process modeling.pdf

    11/30

    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

    = =

    + =

  • 7/30/2019 Process modeling.pdf

    12/30

    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 = kCACBrD = -3rA = 3kCACB

  • 7/30/2019 Process modeling.pdf

    13/30

    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 ix 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 volatilityassumption is often made

  • 7/30/2019 Process modeling.pdf

    14/30

    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)

  • 7/30/2019 Process modeling.pdf

    15/30

    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

    xP

    =

    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 =

  • 7/30/2019 Process modeling.pdf

    16/30

    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)

  • 7/30/2019 Process modeling.pdf

    17/30

    17

    Example

    accumulation = in - out

    i i

    dVF F

    dt

    =

    Material balance

  • 7/30/2019 Process modeling.pdf

    18/30

    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

    dTE

    TE 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

    = + + + +

  • 7/30/2019 Process modeling.pdf

    19/30

    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 Qdt 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)

  • 7/30/2019 Process modeling.pdf

    20/30

    20

    Eq. 6 becomes:

    ( )( ) ( ) (9)

    Assume constant density and volume (so ).

    ( ) (10)

    (11( ) )

    p ref

    i i p i ref p ref

    i

    p p i

    i

    p

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

    dt

    F 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. Vis constant.

    5.is constant.

  • 7/30/2019 Process modeling.pdf

    21/30

    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 C FC Ft

    +

    + +

    +

    =

    =

    |

    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=

  • 7/30/2019 Process modeling.pdf

    22/30

    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 z

    v

    C Cv kCt z

    =

    =

    =

    0

    .

    ( , 0) ( )

    (0, ) ( )

    A A

    A Ain

    C z t C z

    C t C t

    = =

    =

  • 7/30/2019 Process modeling.pdf

    23/30

    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 F C C kC dt V

    x C C

    dx F F x k x

    dt V V t t t V F

    dx dx F dx F F x k x

    Vdt V d V V

    d F

    =

    = +

    = =

    = = = +

    ,0 steady-state feed concentration of AAfC =

    ,0f Af Afx C C=

    residence timerest V F= =

  • 7/30/2019 Process modeling.pdf

    24/30

    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 Vk x x x xd F

    Vk F

    dx x

    kF 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 canrarely be obtained (except for few examples).

    iFdh h

    dt A A

    = If there is no inlet flow,

  • 7/30/2019 Process modeling.pdf

    25/30

    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

    =

    =

  • 7/30/2019 Process modeling.pdf

    26/30

    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 )

    ParametersA 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)

  • 7/30/2019 Process modeling.pdf

    27/30

    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.

  • 7/30/2019 Process modeling.pdf

    28/30

    28

    State variable form for Ex.2

    i

    dVF F

    dt=

    ( )iA

    Ai A A B

    FdC

    C C kC C dt V=

    ( ) 2iB Bi B A BFdC

    C C kC C dt V

    =

    ( )iPPi P A B

    FdC C 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 C C V

    FC C C kC C

    V

    FCC C kC C

    V

    =

    +

    ( )

    ( )( )

    ( )

    1 21

    13 2 1 2 3 12

    1

    2

    14 3 1 2 3 33

    1

    4

    14 5 4 1 2 3

    1

    ( ) , ,

    , ,( ) 2 , ,

    , ,

    ( )

    u ux

    uu x p x x fx

    x

    fuu x p x x fx

    xf

    ux u x p x x

    x

    = = +

    x u p

    x u px u p

    x u p

    4 states

    5 inputs1 parameter

  • 7/30/2019 Process modeling.pdf

    29/30

    29

    Homework #1

    1. Irreversible consecutive reactions ABC 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 RT

    A

    E RT

    B

    r k e C H

    r k e C H

    = =

    = =

  • 7/30/2019 Process modeling.pdf

    30/30

    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 ( ).v

    q C P=