CHE654 Problems 2012

Embed Size (px)

Citation preview

  • 8/13/2019 CHE654 Problems 2012

    1/65

    1

    CHE654

    Modeling Chemical Processes

    Using MATLAB

    Exercise Problems

    6th

    Edition

    Prepared by

    Dr. Hong-ming Ku

    King Mongkuts University of Technology ThonburiChemical Engineering Department

    Chemical Engineering Practice School

    2003- 2012 Use with Permission of the Author Only

  • 8/13/2019 CHE654 Problems 2012

    2/65

    2

    1. System of Linear Algebraic Equations, IUse MATLAB to solve the following system of linear algebraic equations, correct to 4decimal places:

    x1 + 2x2 + x3 + x5 1 = 0

    2x1 4x2 x3 + x4 + x5 + 2 = 0

    2x2 + 4x3 + x4 6x5 + 6 = 0

    3x1 + x4 2x5 4 = 0

    x1 + x2 + x3 + 3x4 + 8x5 = 0

    2. System of Linear Algebraic Equations, IIUse MATLAB to solve the following system of linear algebraic equations, correct to 4

    decimal places:

    2x1 + 4x2 x3 + x4 = 6

    x1 + 2x2 + x3 x4 + x5 = 8x2 x3 + 2x4 + x5 = 12

    4x1 + x2 + x3 + x4 + 2x5 = 2

    6x1 + 2x3 4x4 2x5 = 4

    3. System of Nonlinear Algebraic EquationsUse MATLAB to solve the following system of nonlinear algebraic equations:

    exp(2x1) x2 4 = 0x2 x3

    2 1 = 0

    x3 sin(x1) = 0

    4. Pressures in a Pipeline NetworkConsider the following interconnected liquid pipeline network which contains 4 valveswith the following valve coefficients. Calculate the pressure at each location/node

    indicated in the network.

    Cv,1= 0.2 ft3/(psia)1/2-hr Cv,2= 0.1 ft

    3/(psia)1/2-hr

    Cv,3= 0.4 ft3/(psia)1/2-hr Cv,4= 0.3 ft3/(psia)1/2-hr

  • 8/13/2019 CHE654 Problems 2012

    3/65

  • 8/13/2019 CHE654 Problems 2012

    4/65

    4

    Write MATLAB expressions in an M-file (script file) to do the following (use format

    short in all calculations unless otherwise told):

    (a)Determine the sum of the second column of B.(b)Select the first 3 columns and the first 3 rows of A and Band add their determinants .(c)Determine the square root of the product (a scalar) between the last row of Cand the

    second column of A.

    (d)Determine the sum of the second row of Adivided element-by-element by the thirdcolumn of C.

    (e)Evaluate the hyperbolic secant of (0.01 * A * C).(f) Evaluate the following function: tan-1(0.1*B *C) in 6 decimal places.

    7. Inverse and Determinant of 22 and 33 MatricesUse MATLAB to write a program that can determine the inverse and determinants of any

    22 and 33 matrices, which can then be used to solve a system of linear algebraic

    equations in 2 or 3 unknowns.

    Recall that the formulae for calculating the determinant of 22 and 33 matrices are asfollows:

    If then

    If then

    and

    Use the above formulae to solve the following two systems of linear algebraic equations:

    =

    2221

    1211

    aa

    aa

    A21122211)det( aaaaA =

    =

    1121

    12221

    )det(

    1

    aa

    aa

    AA

    =

    333231

    232221

    131211

    aaa

    aaa

    aaa

    A

    )(

    )()()det(

    1322122331

    13321233212332223311

    aaaaa

    aaaaaaaaaaA

    +

    =

    =

    122111221132123122312132

    112313211331113321332331

    132212231233133223322233

    1

    )det(1

    aaaaaaaaaaaa

    aaaaaaaaaaaa

    aaaaaaaaaaaa

    AA

    324035262)(

    12632)(

    321321321

    2121

    ==++=+

    =+=

    xxxxxxxxxb

    xxxxa

  • 8/13/2019 CHE654 Problems 2012

    5/65

    5

    8. Steady-State Material Balances on a Separation TrainParaxylene, styrene, toluene, and benzene are to be separated with an array of distillation

    columns shown in the figure below.

    7% Xylene

    D1 4% Styrene

    54% Toluene

    35% Benzene

    D

    18% Xylene24% Styrene

    15% Xylene B1 42% Toluene25% Styrene 16% Benzene

    40% Toluene D220% Benzene 15% Xylene

    10% Styrene

    FT= 70 kgmol/min 54% Toluene

    B 21% Benzene

    24% Xylene

    B2 65% Styrene

    10% Toluene1% Benzene

    Formulate the problem as a system of simultaneous linear equations and solve it using

    MATLAB.

    9. Using MATLAB to Solve the Peng-Robinson Equation of StateThe Peng-Robinson equation of state contains 2 empirical parameters aand b, and its

    conventional form is given by:

    where

    22 2 bbVV

    a

    bV

    RTP

    mmm +

    =

    =

    C

    C

    P

    TRa

    22

    45724.0

    =

    C

    C

    P

    RTb 07780.0

  • 8/13/2019 CHE654 Problems 2012

    6/65

    6

    The variables are defined by:

    P = pressure in MPaVm = molar volume in cm

    3/gmole

    T = temperature in KR = gas constant (8.314 cm

    3-MPa/gmole-K)

    TC = the critical temperature (150.86 K for argon)PC = the critical pressure (4.898 MPa for argon)P

    VAP = vapor pressure (0.4946 MPa at Tr= 0.7 for argon)

    Alternatively, this equation of state can be expressed in polynomial forms as given below:

    Use MATLAB to compute the molar volume of argon using both the conventional form andthe polynomial form at T= 105.6 K and P= 0.498 MPa. The two solutions should be thesame. Because the two equation forms are both cubic in molar volume, you should obtain 3

    different answers in volume. Briefly describe the physical meaning or significance of each

    answer.

    10.Pressure-Temperature Curve of Saturated WaterChemical engineers use tabulated pressure-volume-temperature (PVT)data to analyze thecharacteristics of various liquids such as ethanol, refrigerant, and water, which change

    25.02 )]1)(26992.054226.137464.0(1[ rT++=

    C

    rT

    TT =

    ==

    C

    r

    VAP

    P

    TP )7.0(log0.1

    10

    22

    TR

    aPA =

    RT

    bPB =

    0)()32()1( 32223 =+++++ BBABZBBAZBZ

    factorilitycompressibtheRT

    PVZwhere m ,=

  • 8/13/2019 CHE654 Problems 2012

    7/65

    7

    phases between solid, liquid, and gas. One such problem is to determine the change in

    enthalpy of saturated water as it is vaporized to steam. Suppose the system consists of 1 kgof saturated water. An appropriate model to use in this instance is the Clapeyron equation.

    h = T(Vg Vf) dPdT

    Here his the change in enthalpy between the liquid and gas phase as the water vaporizes.The parameter Tdenotes the temperature in degrees Kelvin, and VgandVfare the specific

    volumes of the gas and liquid, respectively. The derivative, dP/dTdenotes the rate ofchange of pressure with respect to temperature. Numerical pressure-temperature points areavailable from standard steam tables and are summarized in the following table:

    Pressure-Temperature Data for Saturated Water

    T (C) P (bars)50 0.123560 0.1994

    70 0.3119

    80 0.4739

    90 0.7014

    100 1.014110 1.433

    120 1.958130 2.701

    140 3.613

    150 4.758

    Values for the constants T, Vg, andVfalso can be obtained directly from the steam table

    data. In this case, 100C corresponds to T= 373.15 K, while Vg= 1.673 m3/kg, and Vf=

    0.00104 m3/kg. The objective here is to estimate the heat of vaporization h(in kJ/kg) at

    100C.

    To estimate the value of dP/dT, a number of approaches might be used. One possibility is

    to compute a numerical derivative directly from the data in the table. Another approach to

    be used here is to fit a curve to the data and then differentiate the curve analytically. In thiscase, use a cubic polynomial curve in MATLAB. Make a plot of the fitted curve and the

    data (on the same graph).

    11.Propane CylinderA gas cylinder, whose exterior dimensions are a height of h= 1.35 m and a diameter of d=

    0.25 m, is shown below. The cylinder contains m= 2.9 kg of propane at T= 120C.

    d

  • 8/13/2019 CHE654 Problems 2012

    8/65

    8

    h

    Suppose that readings from a pressure gauge attached to the cylinder indicate that the

    pressure of the propane is P= 30 bars (absolute). The objective is to determine the interior

    volume of the cylinder and from that the wall thickness.

    Use the Redlich-Kwong equation of state which contains 2 empirical parameters aand basfollows:

    where for propane, a= 182.23 bar-m6-K5/kmol2and b= 0.06242 m3/kmol

    TbVV

    a

    bV

    RTP

    )( +

    =

  • 8/13/2019 CHE654 Problems 2012

    9/65

    9

    12. Statistical Analyses Using Matrices in MATLABYou are to use MATLAB to carry out some statistical analyses on a set of data given in thetable below.

    Undergr. GPA ChEPS GPA

    3.58 3.97

    3.33 3.71

    3.28 3.57

    3.27 3.54

    3.15 3.61

    3.33 3.75

    2.97 3.72

    3.09 3.42

    3.22 4.00

    2.89 3.66

    3.05 3.89

    2.90 3.28

    3.10 3.71

    3.01 3.64

    3.31 3.64

    3.45 3.643.22 3.64

    3.19 3.61

    3.14 3.78

    3.16 3.64

    3.45 3.85

    wherex= undergraduate GPA andy= ChEPS GPA.

    Please note that you are not allowed to useforloop or any control statements in yourcalculations. Use only vectors, matrices, and their manipulations. Finally, usefprintfto

    output your results that look like the table below. The spacing is not important as long as

    your table looks neat. Note that I want 2 decimal places for the maximum and the minimum

    and 3 decimal places for the mean, the median, and the standard deviation. For the

    correlation coefficient, I want an answer in 4 decimal places.

    Maximum Minimum Mean Median STDEV

    ------------- ------------- --------- ----------- ---------

    Underg GPA x.xx x.xx x.xxx x.xxx x.xxx

    The data consist of undergraduate GPAs of 21 students fromChEPS Class-11 and their ChEPS GPAs upon graduation. We

    like to find out if there is a strong correlation between these two

    set of data. You are asked to carry out a number of statistical

    analyses using MATLABs matrix functionality. You must first

    create a 212 matrix that contain the data given in the table.From that matrix, do the following:

    1. Compute the maximum, minimum, mean, and median ofthe students undergraduate GPAs and ChEPS GPAs.

    2. Compute the standard deviations of undergraduateGPAs and ChEPS GPAs using the following formula:

    whereN= total data size and = mean of the data. Donot use the built-in function in MATLAB to compute

    this number.

    3. Compute the Pearsons correlation coefficient r, whichindicates the correlation between undergraduate GPAand ChEPS GPA, as given by the formula below:

    =

    =N

    i

    ix

    Ns

    1

    2)(1

    1

    ( ) ( )

    ( ) ( )[ ] ( ) ( )[ ]2222

    =

    yyNxxN

    yxxyNr

  • 8/13/2019 CHE654 Problems 2012

    10/65

    10

    ChEPS GPA x.xx x.xx x.xxx x.xxx x.xxx

    Pearson correlation coefficient r !.xxxx

    Maximum Minimum Mean Median STDEV

    Underg GPA ________ ________ ________ ________ ________

    ChEPS GPA ________ ________ ________ ________ ________

    Pearsons correlation coefficient r= ____________

    13. Using MATLAB to Solve Simple ChE Problems(a)Use MATLAB to determine the stoichiometric ratios of molecular species in the

    following reaction:

    C6H12O6 + NH3 + O2 C5H9NO2 + CO2 + H2O

    = __________ = __________ = __________ = _________

    (b)It is proposed that a steel tank be used to store carbon dioxide at 300 K. The tank is 2.5m

    3in volume, and the maximum pressure it can safely withstand is 100 atm. Using the

    Beattie-Bridgeman equation of state given below, determine the maximum number of

    moles of CO2that can be stored in the tank

    P = RT + + + V V

    2V

    3V

    4

    where R = gas constant = 0.08206 L-atm/gmole-K

    P, V, T = pressure in atm, molar volume in L/gmole, and temperature in K

    respectively

    = R T B0A0R c

    T2

    = R T B0 bA0 aR c B0T

    2

    = R T B0b cT

    2

    For CO2,A0= 5.0065, a= 0.07132,B0= 0.10476, b= 0.07235, and c= 66.0104

  • 8/13/2019 CHE654 Problems 2012

    11/65

    11

    Note that 1 m3= 1000 L and 1 kg-mole = 1000 gmoles

    14.Expansion and Contraction of a BalloonA balloon expands or contracts in volume so that the pressure inside the balloon isapproximately the atmospheric pressure.

    (a)Develop a mathematical model (i.e. write the differential equation) for the volume of aballoon that has a slow leak. Let Vrepresent the volume of the balloon and qrepresent

    the molar flowrate of air leaking from the balloon. Define all variables in your model

    and state all assumptions.

    (b)The following experimental data have been obtained for a leaking balloon.t(minutes) r(cm)

    0 105 7.5

    Predict when the radius of the balloon will reach 5 cm using two different assumptions

    for the molar rate of air leaving the balloon:

    (i) The molar rate is constant.(ii)The molar rate is proportional to the surface area of the balloon.Reminder: The volume of a sphere is 4/3 r3and the area of a sphere is 4r2.

    15. Dynamics of a Gas Surge DrumSurge drums are often used as intermediate storage capacity for gas streams that are

    transferred between chemical process units. Consider a drum in the figure below, where qf

    is inlet molar flowrate and qis the outlet molar flowrate.

    qf, Pf, T q, P, T

    (a)Let V, P, and Tbe the volume, the pressure, and the temperature of the drum,respectively. Write a model (one differential equation) to describe how the pressure in

    the tank varies with time. Assume ideal gas and isothermal operation.

    (b)Solve for Panalytically using the following data:qf = 2.0 + 0.1t kmol/min q = 3.0 kmol/min

    V = 50 m3 T = 300 K

    R = 8314 m3-Pa/kmol-K

    P, V, T

  • 8/13/2019 CHE654 Problems 2012

    12/65

    12

    if the drum initially contains 10 kmol of methane. Assuming that the vessel was built to

    withstand a maximum pressure of 50 atm, how long can we run this operation before the

    inlet gas flow must be shut off?

    (c)The ideal gas law is a poor assumption because of high pressure in the drum. Supposethe methane gas stream obeys the virial equation of state as follows:

    For simplicity, we will truncate all terms after the second virial coefficient B(T). Repeat

    the calculations in Part (b). For methane,B(T=300 K) = 0.04394 m3/kmol.

    16.pH of Natural Rain WaterCO2is a trace yet important constituent of the atmosphere that keeps the earth warm enough

    for life in their current forms. The concentration of CO2before the industrial revolution has

    been relatively constant over a long period. CO2is slightly water soluble, which makes the

    natural rain in a clean atmosphere slightly acidic due to the dissolution of CO2into the clouddroplets. The partitioning of CO2into a droplet can be described by the following

    equilibrium relations:

    The concentration of hydrogen ion (H+) in the water determines its acidity. A higher

    concentration of H+means higher acidity. The acidity of a rain or cloud droplet is usually

    quantified by the pH of the droplet, which is related with the concentration of H+([H

    +])

    using the following equation: pH = log10[H+]. Thus, lower pH means higher acidity.

    Based on the above equilibrium relationships and the principle of charge balance in an

    aqueous solution, the [H+] in the CO2/H2O system (and thus the pH) can be determined

    using the following equation:

    where pCO2is the partial pressure of CO2in the atmosphere (in units of atm); KH,CO2,

    Ka1,CO2, Ka2,CO2 are Henrys law constant (in units of M/atm), and first and second acid

    .....)()()(

    132

    ++++=V

    TD

    V

    TC

    V

    TB

    RT

    PV

  • 8/13/2019 CHE654 Problems 2012

    13/65

    13

    dissociation constants for CO2, respectively, and Kwis the water dissociation constant

    (which varies with temperature). For a given value of the partial pressure of CO2, theconcentration of H+ and thus the pH can be determined.

    (a)Given that Kw= 1.810-14(when T= 30C) KH,CO2= 10-1.46, Ka1,CO2= 10-6.3, Ka2,CO2=10

    -10.3, and pCO2 = 280 ppm (atm), use function solvein MATLAB to determine the pH

    of natural rain water. Useformat short in all your calculations.

    (b)Verify the answer in Part (a) by using the function rootsin MATLAB.(c)Equation (1) which is nonlinear can be solved using a root-finding algorithm. One such

    method discussed in class isNewton-Raphson whose iterative formula for one variable

    is given by:

    Write a MATLAB program to generate a plot of CO2partial pressure (ppm) vs. pH of

    natural rain water using Newton-Raphson. Provide a title and label yourx-axis andy-

    axis properly. The pH should be calculated at CO2partial pressures between the range

    of 280 ppm and 420 ppm using an increment of 20 ppm (use a FOR loop). At pCO2=

    280 ppm, use an initial guess of [H+] = 5.010-6to solve Equation (1). For subsequent

    pCO2s, use the answer from the previous increment as the initial guess, e.g. use the

    [H+] solution from the case where pCO2= 280 ppm as a starting point for the case

    where pCO2= 300 ppm. You may rearrange Equation (1),f([H+]) = 0, into another

    form in order to help determinef([H+]) more easily. The termination criterion forNewton-Raphson is when the absolute relative percent error of the pH (not [H+])

    between two successive iterations is less than 10-4.

    Answers: pH (pCO2= 280 ppm) = ____________

    pH (pCO2= 360 ppm) = ____________ pH (pCO2= 420 ppm) = ____________

    17. Solving aSystem of ODEs Using MATLABSolve the following set of 1

    st-order ODEs, which is an initial-value problem, using

    MATLABs ode45function fromx= 0 tox= 2 with an increment of 0.1:

    subject to: y1(0) =y2(0) = 0

    Make a plot of the 2 equations (y1andy2versusxsolutions from MATLAB). Then,

    compare your MATLAB solution with the analytical solution below by reporting the

    relative % differences. Include 6 decimal places in reporting all your numbers.

    112

    21

    +=

    +=

    ydx

    dy

    xydx

    dy

    ...,3,2,1)(

    )(1 ==+ kxf

    xf

    xxk

    k

    kk

  • 8/13/2019 CHE654 Problems 2012

    14/65

    14

    y1(x) = c1ex + c2e

    -x 2

    y2(x) = c1ex c2e

    -x x

    18. Solving ODEs with MATLAB(a)Solve the following 1st-order ODE using MATLABs ode45function fromx= 0 tox = 2

    with an increment of 0.1.

    y(0) = 1

    Make a plot of the equationyvs.xwith solutions from MATLAB. Then compare your

    MATLAB solutions with those from the analytical solution of

    y(x) = [2 exp(-x2)]

    1/2

    and report the relative % differences. Include 6 decimal places in reporting all your

    numbers.

    (b)Solve the following 2nd-order ODE, which is an initial-value problem, usingMATLABs ode45function fromx= 1 tox= 3 with an increment of 0.1:

    y!+ xy = x3 4/x3

    subject to: y(1) = 1, y(1) = 4

    Make a plot of the 2 equations:yandyversusxwith solutions from MATLAB. Thencompare your MATLAB solutions with those from the analytical solution of y=x

    2

    2/xby reporting the relative % differences. Include 6 decimal places in reporting all

    your numbers.

    19. The Shooting Method to Solve a Linear ODESolve the following 2

    nd-order linear ODEs, which is a boundary-value problem, using

    MATLABs ode45function with an increment inxof 0.05:

    y! xy + 3y = 11x

    subject to: y(1) = 1.5y(2) = 15

    Make a plot of the equationy(x), and compare your MATLAB solution with the exact

    solution ofy(1) = 5.500000 by reporting the relative % difference. Include 6 decimalplaces in reporting all your numbers.

    xyy

    x

    dx

    dy=

    2

  • 8/13/2019 CHE654 Problems 2012

    15/65

    15

    20. Solving a 3rd

    -Order Boundary-Value ODE Using the Shooting MethodConsider the following 3rd-order ODE which is a boundary-value problem (t = 0 to 2):

    subject to y(0) = 0,y(2) = 1, andy!(2) = 0

    (a) Is the above ODE linear or nonlinear?(b)Write a MATLAB program to implement the shooting method to solve the above ODE

    (use ode45).Use format short. Note that if the ODE is nonlinear, you are not

    guaranteed to obtain the correct solution in 3

    trials.

    You will need to keep guessing untilyou find the correct answers that match all the given initial and boundary conditions.

    (c)Ploty(t),y(t), andy!(t) as a function of ton the same graph.

    21. Solving a 2nd

    -Order ODE Boundary-Value ProblemConsider the following 2

    nd-order ODE which is a boundary-value problem whose domain t

    ranges from t= 1 to t= 10.

    2y! + y 0.5y = exp(y/t) s.t. y(1) = 1 and y(10) = 10

    What are the values ofyat t= 1 and t= 10? Useformat shortto show all your calculations.

    Answers:(accurate to 4 decimal places)

    y(1) = _______________ y(10) = ______________

    22. Solving a 3rd

    -Order ODE Boundary-Value ProblemConsider the following 3

    rd-order ODE which is a boundary-value problem

    Use ode45in MATLAB to solve for numerical solutions of the above ODE between t= 0 and

    t= 1, showing a step size of 0.1.

    The analytical (exact) solution of the above ODE is: y(t) = t(a+ bt)exp(ct)

    where a, b, and care constant coefficients. Also, use MATLAB and the numerical answersfrom ode45to determine the correct values of a, b, and c, without taking any derivatives of

    y(t).

    yttydt

    dy

    dt

    yd=+ 33

    3

    3

    510

    123

    )1(,0)1(,0)0(..,10)352( eyyytstettttyyt

    ===""+=

  • 8/13/2019 CHE654 Problems 2012

    16/65

    16

    Answers:

    y(t=0) = ______0______ y(t=0) = _____________ y(t=0) = _____________

    y(t=0.5) = ____________ y(t=0.5) = ____________ y(t=0.5) = ____________

    y(t=1) = ______0______ y(t=1) = ___2.7183____ y(t=1) = _____________

    The values of coefficients are: a= _____ b= _____ c= _____

    23. Solving a 3rd

    -Order ODE Boundary-Value ProblemConsider the following 3rd-order ODE which is a boundary-value problem:

    The analytical (exact) solution of the above ODE is:

    Use ode23in MATLAB to solve for numerical solutions of the above ODE between t= 0 and

    t= 1, when l = 2 and a = 3, showing a step size of 0.1. Then compare the numerical

    solutions with the exact solutions by calculating the relative percentage deviation in 6 decimal

    places at t= 0, 0.2, 0.4, 0.6, 0.8, and 1.0. Note that the percentage deviations must be positive

    numbers.

    Answers:(accurate to 6 decimal places)

    y(t=0)MATLAB= __________ y(t=0)EXACT= __________ % Deviation = __________

    y(t=1)MATLAB= __________ y(t=1)EXACT= __________ % Deviation = __________

    24. Solving a 2nd

    -Order Boundary-Value ODE Using the Shooting MethodThe diffusion and simultaneous first-order irreversible chemical reaction in a single phase

    containing only reactantAand productBresults in a second-order ODE given by:

    where CAis the concentration of reactantA(kmol/m3),zis the distance variable (m), kis the

    homogeneous reaction rate constant (s-1), andDABis the binary diffusion coefficient (m3/s).

    A

    AB

    A CD

    k

    dz

    Cd=

    2

    2

    2640.0)5.0(,0)5.0(,0894.0)0(..,1002 ===""=+ yyytstayly

  • 8/13/2019 CHE654 Problems 2012

    17/65

    17

    A typical geometry for the above ODE is that of a one-dimensional layer that has its surface

    exposed to a known concentration and allows no diffusion across its bottom surface. Thus,the initial and boundary conditions are:

    CA(z= 0) = CA0 and dCA(z=L) = 0dz

    where CA0is the constant concentration at the surface (z= 0) and there is no transport across

    the bottom surface (z=L) so the derivative is zero. This differential equation has an

    analytical solution given by:

    (a) Is the above ODE linear or nonlinear? Write a MATLAB program to implement theshooting method to solve the above ODE (useode23),in whichCA0= 0.2 kmol/m

    3, k=

    0.001 s-1

    ,DAB= 1.2x10-9

    m2/s, andL= 0.001 m. Use format short e.

    (b)Compare the concentration profiles over the thickness as predicted by the numericalsolution of (a) with the analytical solution by reporting the relative percentage

    differences accurate to 6 decimal places with an increment of z= 10-4.

    (c)Obtain a numerical solution for a second-order reaction that requires the CAterm on theright side of the ODE to become squared. The second-order rate constant is given by k

    = 0.02 m3/(kmole-s). Use format short e and ode23. Is this new ODE linear or

    nonlinear?

    25. Solving a Nonlinear 3rd

    -Order ODE Boundary-Value ProblemConsider the following nonlinear3

    rd-order ODE which is a boundary-value problem:

    with the following boundary conditions:y(0) = 1.0,y(2) = 29.3373,y!(2) = 5.1807. Use theshooting method and ode45in MATLAB to solve the above equation numerically from t=

    0 to t= 2. Because the ODE is nonlinear, your answer will not be correct after 3 trials.

    Rather than guessing the answer repeatedly, you are to use the whileloop in MATLAB to

    keep interpolating linearly between the two latest guesses until | answer target | < 0.0001.Start your shooting method with the following two guesses: G1 = 10 and G2 = 20. After

    obtaining G3 from linear interpolation, your G1 becomes G2 and G2 becomes G3. Keep

    repeating the process until the tolerance of 0.0001 is achieved.

    =

    AB

    AB

    AA

    D

    kL

    L

    z

    D

    kL

    CCcosh

    1cosh

    0

    t

    eyytyy

    23

    )cos()(4 =+

  • 8/13/2019 CHE654 Problems 2012

    18/65

    18

    Answers:(accurate to 4 decimal places)

    y(0) = __1.0000___ y(0) = __________ y(0) = __________

    y(1) = __________ y(1) = __________ y(1) = __________

    y(2) = __29.3373__ y(2) = __________ y(2) = __5.1807___

    26.Isothermal Compression of Ethane

    Ethane is being compressed isothermally at 50 C (323.15 Kelvin) to 1/100th(i.e. 1%) of itsinitial volume in a closed vessel. The initial pressure of the gas is 1.01325 bar.

    We wish to calculate the work per gmole required in this compression. For a closed system

    in a reversible isothermal compression from V1to V2, the work Wdone on the system can becalculated from:

    dW = PdV

    Use MATLAB to do the following:

    (a)Calculate the work Wusing the ideal gas assumption.(b)Calculate the work Wusing the Redlich-Kwong-Soave equation of state, which is given

    by:

  • 8/13/2019 CHE654 Problems 2012

    19/65

    P =V =T =R =

    TC =

    PC =

    =

    Answers:

    (a) Work (ideal gas) =(b)Work (RKS gas) =

    27. Heat Transfer in a TapConsider a tapered fin of

    The governing equation f

    second-order differential

    where y = dimensio

    x = dimensio

    where q is the unifor

    fission, electrical diss

    19

    pressure in bar

    molar volume in L/gmole

    temperature in Kgas constant (0.08315 bar-L/gmole-K)

    critical temperature in K (305.556 K for et

    critical pressure in atm (48.2989 bar for et

    Pitzer acentric factor (0.1064 for ethane)

    __________________ bar-L/gmole

    __________________ bar-L/gmole

    red Fintrapezoidal profile:

    r the temperature distribution in the fin is th

    quation

    less temperature = (T T) / (Tw+ T)

    less distance =

    (Tw T)

    rate of internal heat generation per unit vol

    ipation, chemical reaction, etc.) and k is the

    ane)

    ane)

    dimensionless

    ume (via nuclear

    hermal conductivity.

  • 8/13/2019 CHE654 Problems 2012

    20/65

    where h is the aver

    Based upon the known ph

    dimensional temperature

    this problem, the fin has a

    The physical conditions o

    e = 30 cm

    k = 60 J/sec-cm

    T#= 20C

    Use ode45in MATLAB t

    questions. Useformat sh

    versusx. Label yourx-ax

    Answers:(accurate to 4 d

    y(0) = _____________

    28.Maclaruin Series ExpanA Maclaurin series is a T

    the Scottish mathematicia

    approximate any mathem

    the sine function and the s

    Write a MATLAB pr

    given point using the

    x

    x)sin(

    20

    ge convective heat transfer coefficient.

    ysical conditions for a fin, it is possible to so

    istribution inside the fin if we know the bou

    diabatic ends, i.e. T = T#at u = 0 and T = Tw

    the fin are given as follows:

    b = 60 cm l= 300 c

    -C q = 0.016 J/cm3-sec $h = 0.01

    Tw= 100C

    o solve the above ODE numerically and ans

    rtto show all your calculations. Also in yo

    is andy-axis properly and include a legend i

    ecimal places)

    __ T(u=150 cm) = ______________

    sionylor series expansion of a function about 0,

    n Maclaurin. If enough terms are carried, th

    tical function to the desired accuracy. The

    quare root are as follows:

    ogram to compute the value of the following

    given Maclaurin formulae:

    radiansinisxwherexat ,2=

    lve for the one

    dary conditions. For

    at u = l.

    m

    /cm2-sec-C

    er the following

    r output, plotyandyyour graph as well.

    C

    nd are named after

    Maclaurin series can

    aclaurin formula for

    two functions at the

  • 8/13/2019 CHE654 Problems 2012

    21/65

    21

    )(3

    )(4t

    D

    PPt F

    C

    Dg%

    &

    &&% =

    =

    Both values should be computed accurate to 14 decimal places which is the accuracy of

    format long in MATLAB when compared with the exact solution. This means using

    the following convergence criterion:

    Also, in your MATLAB program, report the total number of terms needed in the series

    expansion in order to achieve the desired accuracy.

    Answers:

    Maclaurin series solution for the sine function = ___________________________

    Number of terms required = __________

    Maclaurin series solution for the square root function = _____________________

    Number of terms required = __________

    29. Solving for Terminal Velocity of Solid Particles with Successive SubstitutionThe direct method (or successive substitution) can be used to solve a nonlinear algebraic

    equation. The algorithm is iterative in which a newly calculated value ofx(the unknown)

    is used as the next guess according to the following formula:

    xk+1 = F(xk) k= 0, 1, 2, ..

    Note that this formula requires thatxbe expressed explicitly as the unknown on the left-

    hand side in the nonlinear equation (although the right-hand side F(x) will also containx).

    Terminal velocity of a solid spherical particle falling in fluid media can be expressed by the

    equation:

    (1-1)

    where vt = the terminal velocity (m/s)g = gravitational acceleration (= 9.80665 m/s2)

    &P = the particle density (kg/m

    3)

    1410" SolutionMaclaurinSolutionExact

    5.01 =+ xatxx

  • 8/13/2019 CHE654 Problems 2012

    22/65

    22

    DP = the diameter of a spherical particle (m)

    CD

    = dimensionless drag coefficient

    The drag coefficient varies with the Reynolds number (Re) as follows:

    CD

    = 24 forRe< 0.1 (1-2)

    Re

    CD

    = 24 (1 + 0.14Re0.7

    ) for 0.1 "Re"1000 (1-3)Re

    where Re = vtDP&/

    & = the density of the fluid (kg/ m

    3

    ) = the fluid viscosity (Pa-s)

    Consider uniform spherical iron pellets withDP

    = 0.5 mm,&P= 7860 kg/ m3that are falling

    in air (&= 1.23 kg/ m3, = 1.79 x 10-5Pa-s) at terminal velocity. Write a MATLAB

    program to do the following (use format short in all calculations):

    (a)Plot F(vt) and vtversus vtin the range 0.01 "vt"10 m/s and locate the approximate rootof equation (1-1), which will be used as the initial guess in Part (b) of the direct method.

    (b)Implement the direct method to solve for the terminal velocity and accept the solutiononly if | vtF(vt) | "0.0001.

    30.Programming in MATLAB (Guess-the-Sum Game)You are to write a MATLAB program which will allow a user to play a little game, called

    Guess-the-Sum, with your computer. The principal idea is very simple. Each time you play

    the game, you will think of an integer mbetween 0 and 5 inclusively, while MATLAB will

    randomly generate an integer nbetween 0 and 5 inclusively as well. Assuming that the

    computer doesnt know what number is in your mind and you dont know what number the

    computer has randomly generated, you and the computer will each take turn guessing the

    sum, m+n, of these two integers. That is, each time you play the game, the computer will

    guess the sum once and you will guess it once.

    For example, if the computer generated an integer 5, and your number is 3, whoever guesses

    the sum to be 8 wins the game. In many cases, though, the sum you and the computer guess

    is not the correct answer. Hence, we use the following rules to award points during thegame.

    1. Whoever guesses the correct sum will receive 10 points.2. If the guess is incorrect, 1 point is deducted for every integer that is larger than or

    smaller than the correct sum. For example, if the correct sum is 9 and your guess is

    5, 4 points (9 5) are deducted; hence, you will receive 6 points for your guess.

  • 8/13/2019 CHE654 Problems 2012

    23/65

    23

    The result is that the closer your guess is to the correct sum, the more points you

    get.3. You will always let the computer guess first, which will be randomized but whose

    value must be equal to or larger than n(the computer shouldnt be stupid enough to

    guess the sum to be less than its integer n). However, you may not guess the samesum that the computer already picked. If the user enters the same sum, make him

    guess again.

    Play the game 10 times and compare the cumulative points you and the computer receive

    and declare the winner. Be sure to include error-checking in your programming to detect

    non-integers or outside-the-range numbers in user input. Your output should look as

    follows:

    Game # 1:Please enter an integer between 0 and 5: 1

    The computer picked 8 to be the sum.Now, it's your turn to guess the sum: 7

    Computer receives 5 points.Player receives 6 points.

    Game # 2:

    Please enter an integer between 0 and 5: 8

    Sorry, 8 is outside the range.

    Please enter an integer between 0 and 5: 4.5

    Sorry, 4.50000 is not an integer number.Please enter an integer between 0 and 5: 2The computer picked 6 to be the sum.

    Now, it's your turn to guess the sum: 6

    Your guess is the same as the computer's. Guess again.

    Now, it's your turn to guess the sum: 8

    Computer receives 7 points.Player receives 9 points.

    Game # 3:Please enter an integer between 0 and 5: 0

    The computer picked 7 to be the sum.Now, it's your turn to guess the sum: 5

    Computer receives 8 points.

    Player receives 10 points.

    . . . . . . . . . .

    . . . . . . . . . .

    . . . . . . . . . .

    Game #10:

  • 8/13/2019 CHE654 Problems 2012

    24/65

    24

    Please enter an integer between 0 and 5: 5

    The computer picked 5 to be the sum.Now, it's your turn to guess the sum: 7

    Computer receives 8 points.

    Player receives 10 points.

    ----------------------------------------------------------------

    The computer receives a total score of 75 points.

    The player receives a total score of 85 points.

    The player is the winner.

    ----------------------------------------------------------------

    31. Programming with MATLAB (Classification of Numbers)In this problem, you are given a list of positive integers that we like to classify as either

    prime number, square number, semi-square number, or neither (i.e. the number does notbelong to any of the 3 classes). You are to write a MATLAB to do the classification. Here

    are the definitions of each class of number:

    1. Prime number a positive integer larger than 1 that is not divisible by any integerexcept 1 and the number itself. Examples of prime numbers are 3, 11, 23, and 29.

    2. Square number a positive integer n which is the sum of the square of consecutivepositive integers starting at 1. For example, 140 is a square number because 140 = 1

    2

    + 22+ 32+ 42+ 52+ 62+ 72.

    3. Semi-square number a positive integer n which is the sum of the square of consecutivepositive oddor evenintegers starting at 1 or 2, respectively. For example, 84 is a semi-

    square number because 84 = 12+ 3

    2+ 5

    2+ 7

    2. So is 120 because 120 = 2

    2+ 4

    2+ 6

    2+

    82.

    Note that a given positive integer will only belong to one of the four number classes.

    Finally, you need to know the 4 simple rules of finding a prime number as follows:

    (i) Rule 1: Check if the number is even. If it is, it is not a prime number because it isdivisible by 2 (Note that 2 is the exception and is a prime number).

    (ii) Rule 2: Check if the number is divisible by 3 or 5. If it is, it is not a prime number.(iii)Rule 3: Find the square root of the number. If the square root results in an integer, the

    number is not a prime number.

    (iv)Rule 4: Divide the number by all the prime numbers less than the square root (but canskip 2, 3, and 5). If the number is not divisible by any of the prime number less than

    the square root, the number is a prime. Otherwise, it is a composite. You will also

    need the following prime numbers up to 100 in Rule (iv):

    [7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97]

  • 8/13/2019 CHE654 Problems 2012

    25/65

    25

    You will test your program on a total of 10 positive integers with the following valueswhich you should put into a vector:

    [455, 647, 650, 731, 991, 969, 652, 819, 560, 863]

    The output from MATLAB should show which class or classes a given number belongs to.

    Answers:

    Prime numbers are: _____________________________________

    Square numbers are: _____________________________________

    Semi-square numbers are: _____________________________________

    Neither are: _____________________________________

    32.Programming with MATLAB(a) Study the pattern below and write a MATLAB program that produces the table

    including the heading (spacing is not important) with 10 or fewer than 10 lines ofcodes.

    A Board of Digits

    1 0 0 0 0 0 0 0 02 2 0 0 0 0 0 0 03 3 3 0 0 0 0 0 0

    4 4 4 4 0 0 0 0 0

    5 5 5 5 5 0 0 0 0

    6 6 6 6 6 6 0 0 0

    7 7 7 7 7 7 7 0 08 8 8 8 8 8 8 8 0

    9 9 9 9 9 9 9 9 9

    You must useforloopsin your programming, i.e. you may not enter the values of this

    matrix directly, and must begin your M-file with clcand clear(counted as 2 lines ofcodes). Finally, if you use a comma to separate two statements on the same line, it willbe counted as 2 lines of programming. Points will be deducted if your MATLAB code is

    longer than 10 lines.

    (b) Long, long ago in places far far away, way before the advent of the computer game,

    Neanderthals (a primitive human race which died out thousands of years ago) played

    games with sticks. In the pursuit of the wisdom of the ancients, we return to this humble

    setting in order to come to a deeper understanding of the universe and computer

    programming. One such game was called Nimrod (after the man who invented it,

  • 8/13/2019 CHE654 Problems 2012

    26/65

    26

    Nimble Roderick). Nimrod is played with two piles of rods and two players. The

    objective is to be player who takes the last rod. A valid move is to take any number ofrods from either pile, or an equal number from both piles. Play progresses until no rods

    remain.

    A sample game:

    Pile 1: 5, Pile 2: 9

    Ben takes 0 from Pile 1 and 2 from Pile 2

    Pile 1: 5, Pile 2: 7

    Jen takes 2 from Pile 1 and 2 from Pile 2

    Pile 1: 3, Pile 2: 5

    Ben takes 3 from Pile 1 and 0 from Pile 2

    Pile 1: 0, Pile 2: 5

    Jen takes 0 from Pile 1 and 5 from Pile 2Pile 1: 0, Pile 2: 0

    Jen wins! Ben loses!

    Write a MATLAB program to play Nimrod. Use the following rules and guidelines:

    (1)The number of rods in each pile must be generated randomly between 5 and 10inclusively.

    (2)Ben and Jen will each take turn to play the game, so in your output be sure to printout whether it is Bens or Jens turn. When testing your program, you will need to

    take turn pretending to be either Ben or Jen.(3)In your programming, you will need to let the player choose the option of removingrods from just one pile or equal number of rods from both piles.

    (4)The only error checking you need to implement is to make sure that the player doesnot remove a non-positive number of rods ("0) or remove more than what is in thepile.

    A sample output from this program looks as follows:

    IT IS BEN'S TURN

    Pile 1: 7, Pile 2: 9Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 2

    Enter the number of rods to remove from both piles: 3

    Ben takes 3 from Pile 1 and 3 from Pile 2

    IT IS JEN'S TURN

    Pile 1: 4, Pile 2: 6

    Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 1

    Which pile? (1 or 2): 1

    Enter the number of rods to remove from Pile 1: 5

    Enter the number of rods to remove from Pile 1: 2

    Jen takes 2 from Pile 1 and 0 from Pile 2

  • 8/13/2019 CHE654 Problems 2012

    27/65

    27

    IT IS BEN'S TURN

    Pile 1: 2, Pile 2: 6

    Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 2

    Enter the number of rods to remove from both piles: 4Enter the number of rods to remove from both piles: 1

    Ben takes 1 from Pile 1 and 1 from Pile 2

    IT IS JEN'S TURN

    Pile 1: 1, Pile 2: 5

    Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 1

    Which pile? (1 or 2): 2

    Enter the number of rods to remove from Pile 2: 0

    Enter the number of rods to remove from Pile 2: 3

    Jen takes 0 from Pile 1 and 3 from Pile 2

    IT IS BEN'S TURNPile 1: 1, Pile 2: 2

    Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 2Enter the number of rods to remove from both piles: 1

    Ben takes 1 from Pile 1 and 1 from Pile 2

    IT IS JEN'S TURN

    Pile 1: 0, Pile 2: 1

    Enter 1 to remove rods from one pile and 2 to remove rods from both piles: 1

    Which pile? (1 or 2): 2Enter the number of rods to remove from Pile 2: 1

    Jen takes 0 from Pile 1 and 1 from Pile 2

    Jen wins! Ben loses!

    33. Mass Balance in a Two-Tank SystemConsider the following two vessels connected in series. Initially (at t= 0), Tank 1 is filled

    with 20 kg of brine solution with 10 kg of dissolved salt (i.e. 10 kg water + 10 kg salt),while Tank 2 is filled with 10 kg of pure water. Pure water is then added to Tank 1. At the

    same time, 1 + 0.1tkg/min of liquid from Tank 1 flows into Tank 2 (meaning that this inter-

    vessel flow increases linearly with time, while 2 kg/min of liquid from Tank 2 flows out.

    2 kg/min, pure water

    1+ 0.1t kg/min

    2 kg/minx1

    x2

    Tank 1

    Tank 2

  • 8/13/2019 CHE654 Problems 2012

    28/65

    28

    (a)If we definex1andx2as the mass fraction of salt in Tank 1 and Tank 2, respectively,derive an analytical expression ofx1as a function of time t. Calculate the concentration(i.e. mass fraction) of salt in Tank 1 at the time when there is a maximum amount of

    liquid in Tank 1.

    Answer: x1(t= ____ min) = ___________ when liquid in Tank 1 is at maximum

    Useful integration formula:

    where B= a+ bx+ cx2, = 4ac b2, = b+ 2cx

    (b) Derive an ODE dx2/dt, and together with dx1/dtin Part (a) use MATLAB to solve for the

    numerical solutions ofx1andx2of this system of two ODEs using ode45. Run your

    model from t= 0 to t= 30 minutes. Make a plot of the numerical solutions as well.Your solution should showx2going through a maximum, as salt enters Tank 2 but then

    its brine solution becomes more dilute as more pure enters Tank 1. Based on MATLAB

    solutions, answer the following questions (correct to 1 decimal place for time and 3

    decimal places for mass fractions):

    Questions:

    1.x2(at t= ______ mins) = _________ whenx2goes through a maximum

    2. Didx1andx2ever become equal? Yes or No: ______

    If yes,x1=x2(at t= ______ mins) = ____________

    34. A Two-Tank SystemA large tank is connected to a smaller tank by means of a valve, which remains closed at alltimes. The large tank contains nitrogen (assume it is an ideal gas) at 700 kPa, while the

    small tank is evacuated (vacuum). The valve between the two tanks starts to leak and the

    0tanh2

    02

    0tan2

    1

    1

    '

    ==

    (

    +

    )

    if

    ifB

    dx

    if

  • 8/13/2019 CHE654 Problems 2012

    29/65

    29

    rate of gas leakage is proportional to the pressure difference between the two tanks, as given

    by

    where PAVG= average absolute pressure across the valve = (P1+ P2)/2

    Valve constant CV= 3.610-4

    kmol/kPa-hour.Tank volumes are 30 m

    3and 15 m

    3.

    Assume constant temperature of 293.15 K in both tanks.

    Universal gas constant = 8.31439 kPa-m3/kmol-K.

    NitrogenP2 V2

    P1 V1

    Leak

    (a)Derive an analytical expression of dn1/dt as a function of n1, where n1is the number ofmoles of nitrogen in the large tank. This ODE of yours should contain only n1as the

    unknown variable. Use MATLAB to solve for n1(use ode45and format short), andrun the model up until t= 25 hours.

    Answer: n1(t= 25 hours) = _______________ kmoles

    (b) As a good chemical engineer, you always look for ways to simplify your engineering

    calculations. In this particular problem, it is possible to derive an analytical solution

    when tis small, i.e. when P2

  • 8/13/2019 CHE654 Problems 2012

    30/65

    30

    35.Mixing Tank with 2 FeedsConsider the following mixing tank problem. Water is flowing into a well-stirred tank at120 kg/hr and methanol is being added at 20 kg/hr. The resulting solution is leaving the

    tank at 100 kg/hr. There is 100 kg of fresh water in the tank at the start of the operation.

    We are interested in determining the mass fraction of methanol in the outlet as a function oftime t.

    120 kg/hr water 20 kg/hr methanol

    100 kg/hr

    solution

    (a)Derive an analytical expression for solving the mass fraction of methanol as a function oftime t. An analytical solution is possible for this particular system.

    (b)Use MATLAB to solve for the mass fraction of methanol in the outlet after 1 hour, and

    compare the number to the exact solution in Part (a). Also, what is the methanol mass

    fraction in the outlet at steady state?

    (c)Of course, steady-state condition probably cannot be achieved in this system because theinflow rate is greater than the outflow rate, and sooner or later, the tank will fill andoverflow. Assuming that the density of the solution in the tank is always constant at

    1000 kg/m3and the volume of the tank is 1.0 m

    3, compute the time it takes for the tank

    to overflow.

    36.Mixing Methanol and Water in a Rectangular Tank(a)Consider the following mixing tank problem. Initially at t= 0 hr, the rectangular tank

    contains a solution of 80 kg water and 20 kg methanol. Pure water then flows into thewell-stirred tank at 100 kg/hr. The resulting solution leaves the tank at 100 kg/hr. Weare interested in determining the mass fraction of methanol in the outlet as a function of

    time t.

  • 8/13/2019 CHE654 Problems 2012

    31/65

    31

    100 kg/hr pure water

    100 kg/hr solution

    Derive an analytical expression for methanol mass fraction in the outlet as a function of

    time, and calculate this mass fraction after 1 hour of operation.

    (b) After 1 hour, a pure methanol feed is introduced into the tank at 20 kg/hr, as shown inthe figure below. This operation continues until t= 20 hours. Derive an analytical

    expression for solving the mass fraction of methanol as a function of time t. Computethe methanol fraction in the outlet after 20 hours.

    100 kg/hr pure water 20 kg/hr methanol

    100 kg/hr solution

    (c) Because the inflow rate is greater than the outflow rate, sooner or later, the tank will fill

    and overflow. Assuming that the density of the solution in the tank is always constant

    at 1000 kg/m3and the cross-sectional area of the tank is 0.1 m

    2, compute the minimum

    tank height to prevent the tank from overflowing after 20 hours of operation.

    (d) Finally, after 20 hours of operation the methanol feed is suddenly changed from a

    constant flow rate to Fmethanol= 20z1/2 kg/hr (i.e. the flow now changes as the square

    root of the liquid height). Use MATLAB to solve for methanol mass fraction in theoutlet at t= 30 hours.

    37. Continuous Cone-Shaped Open VesselConsider a conical open vessel as shown in the following figure. The vessel has a radius R

    at the top and a height H. Water flows into the vessel at a rate of F1and it flows out through

    a valve at a rate of F2. The following data are given:

  • 8/13/2019 CHE654 Problems 2012

    32/65

    32

    F1

    P0

    H = 10 ft Water z

    P1 Cv

    P2R = 3 ft

    F2

    P0= P2 = 14.7 psia

    Cv= characteristic valve constant = 3.0 ft3/psia1/2-min

    * = water mass density = 62.4 lbm/ft3z0 = initial liquid height = z(t = 0) = 5 ft

    F1is not constant but is controlled such that it varies with the liquid height according to:

    F1 = 2z1/2

    ft3/min

    Solve for z analytically as a function of time.

    z

    Hint: Volume of a cone V = )0A(z)dzwhere A(z) = cone cross-sectional area and is a function of z

    38.Adiabatic Expansion/Compression in an Enclosed VesselConsider the following system in which air is trapped inside an enclosed vessel while water

    flows into the vessel at a rate of F1and flows out at a rate of F2.

    P0 Air

    Water Z

    P1 F1P2 F2

    CL

    Initially, the air is at 25C and 1.01325x105Pa (Pascal), and the liquid height is 5.0 meter.The following data are available:

  • 8/13/2019 CHE654 Problems 2012

    33/65

    33

    Gravitational acceleration g = 9.80665 m/s2

    Air CV(heat capacity at constant volume) = 2.0731x104J/kmolC

    Vessel volume =10.0 m3

    Vessel cross-sectional area = 1.0 m2

    Water density = 1000 kg/m

    3 Gas constant R = 8314 m

    3Pa/kmolK

    = 8314 J/kmolKAir MW = 29.0 kg/kmol Valve constant CL= 0.001 m

    3/Pa

    1/2min

    Outlet flow rate F2= 0.1 m3/min Source pressure P1= 3.0x10

    5Pa

    (a)Assuming adiabatic expansion/compression due to the rise/fall of the liquid height, writedown all the system-describing equations. Be sure to define all your variables which areunknown. Use the data given and simplify each equation as much as possible.

    (b) Derive an ordinary differential equation that relates the liquid height as a function of

    time. Your final equation must contain Z as the only dependent variable.

    (c) Solve the ODE in Part (b) using MATLAB and plot the liquid height Z as a function of

    time.

    39. Two Open Continuous Flow Tanks in SeriesConsider two tanks in series as shown where the flow out of the first tank enters the second

    tank. Our objective is to develop a model to describe how the height of liquid in tank 2

    changes with time, given the input flowrate F0(t). Assume that the flow out of each tank is a

    linear function of the height of liquid in the tank (i.e. F1= 1h1and F2= 2h2) and each

    tank has a constant cross-sectional area.

    F0

    F1

    h1 1

    h2 2

    F2

    (a)Develop a system of equations to describe the liquid height of the two tanks as afunction of time, assuming constant liquid density. Be sure to define all your variables.

    (b)Solve for h1and h2analytically if

    A1= 10 ft2 A2= 20 ft

    2 F0= 2 ft

    3/hr

    1= 2= 1 ft2/hr where Aiis the cross-sectional area of tank i

  • 8/13/2019 CHE654 Problems 2012

    34/65

    34

    and tank 1 initially has a liquid height of 1 ft of while tank 2 is empty. Plot the two

    liquid height profiles as a function of time from 0 hr to 5 hr.

    (c) Suppose F0is no longer constant but equals to 2t+ 1 ft3/hr. Use MATLAB to solve for

    the liquid heights in both tanks. Plot both profiles as a function time up to 5 hr.

    40.Liquid Height in a Spherical TankThe following figure shows a spherical tank for storing water. The tank is filled through a

    hole in the top and drained through a hole in the bottom. If the tanks radius isR, one can

    h

    use integration to show that the volume of water in the tank as a function of its height hisgiven by:

    V(h) = Rh2 h33

    Studies in fluid mechanics have identified the relation between the volume flow throughthe bottom hole and the liquid height as:

    whereAis the area of the hole, gis the acceleration due to gravity (32.2 ft/sec2), and Cd is

    an experimentally determined value that depends partly on the type of fluid (for water, Cd =

    0.6).

    Suppose the initial height of water is 8 ft and the tank has a radius of 5 ft with a 1-inch

    diameter hole in the bottom. Use MATLAB to determine how long it will take for the tank

    to empty (i.e. drain completely), to the nearest second (i.e. no decimal places).

    41. Cylindrical and Conical Open Continuous Vessels in SeriesConsider two tanks in series as shown where the flow out of the first tank enters the second

    tank. The first tank is a cylindrical vessel with a radius R 1=1m, a height H1=4 m, and the

    second tank is a cone-shaped vessel with a radius R2=1m, a height H2=5m. The geometry

    of the vessels is shown in the diagram. Our objective is to develop a model to describe how

    the heights of liquid (water), z1and z2, in the 2 tanks change with time .

    R

    ghACFd 2=

  • 8/13/2019 CHE654 Problems 2012

    35/65

    35

    F1

    R1=1 m

    P0

    H1=4 m

    Z1Water CV P2 F2

    P1

    H2=5 m z2

    F3

    R2=1 m

    (a)Given the following data on the cylindrical vessel, derive an analytical expression of z1(t)

    as a function of time. Based on this expression, determine whether the cylindrical vessel

    will drain completely or overflow, and if so when (i.e. after how many minutes?).

    F1= 1.0 m3/min P0= P2= 1 atm

    *water = 1000 kg/m3 g = gravitational constant = 9.80665 m/s2

    CV= 0.001 m3/Pa1/2-min z1(t=0) = 2 m

    (b) A controller was installed in the cone-shaped vessel which regulates the outflow of the

    vessel according to

    F3= ln(1 0.09903z11/2

    )

    If z2(t = 0) = 3 m, derive an analytical expression of z2(t) as a function of time. Based onthis expression, determine whether the cone-shaped vessel will drain completely or

    overflow, and if so when (i.e. after how many minutes?).

    Hint: Note that the cross-sectional area is no longer constant. Volume of a cone

    z2

    V = )0A(z2)dz2, where A(z2) = cone cross-sectional area and is a function of z2.

    (c) Suppose the inflow F1into the first tank is now reduced to 0.3 m3/min and the outflow F3

    from the second tank is maintained at a constant value of 0.05 m3/min, while the rest of

    the data remain the same. We wish to solve this problem again. The above conditions

  • 8/13/2019 CHE654 Problems 2012

    36/65

    36

    will cause both vessels to overflow after a certain time. Use MATLAB to determine

    which vessel will overflow first and exactly when (correct to within 0.1 min).

    42.Modeling Liquid Heights in a Two-Vessel SystemAn open spherical vessel is connected to a closed rectangular tank through an open valve as

    shown in the figure below. Water flows continuously into the spherical vessel at a

    volumetric flow rate of F1with some of the water in the sphere also flowing into the

    rectangular tank at a rate of F2. Water then flows out of the rectangular tank at a flow rate

    of F3, and the temperature inside the tank is always maintained at 298.15 K. We wish to

    study the dynamics of the liquid heights in the two vessels using MATLAB.

    The following data are known about the system:

    CV= 110-5

    m3/Pa

    1/2-min (characteristic valve constant) P0= 1.0132510

    5Pascal

    Cross-sectional area of rectangular tank = 3 m2 Radius of sphereR= 2 m

    Height of rectangular tank = 10 mInitially at t= 0,z1= 3 m,z2= 2 m, P= 1.0132510

    5Pascal

    Gravitational acceleration g = 9.80665 m/s2 * (water)= 1000 kg/m

    3

    Universal gas constantR= 8314 m3-Pa/kmol-K = 8314 J/kmol-K

    Liquid volume inside a sphere as a function of liquid heightzis given by:

    Use MATLABs ode45 to determine whether the liquid heights in the two vessels will ever

    be equal, i.e.z1=z2. If so, report the time (accurate to one decimal place) at which this

    happens and the height.. Ifz1is never equal toz2, determine when the two liquid heights are

    at the closest. Run your model for 20 minutes, which should be sufficient to answer the

    questions.

    F1= 0.1 m /min

    F3= 0.3 m3/min

    F2

    P0

    P2P1

    P

    z2z1

    Air

    3

    32 zzRV

    =

  • 8/13/2019 CHE654 Problems 2012

    37/65

    37

    Answer the following questions:

    Are the two liquid heights ever equal? Yes No

    If yes,z1=z2= ____________ meters

    Time at which the two liquid heights are equal or at the closest = _____________ minutes

    43. Modeling Liquid Heights in a Two-Vessel SystemAn open rectangular vessel is connected to a well-insulated (i.e. adiabatic) and closed

    spherical vessel shown in the figure below. Water from the rectangular vessel is drained

    through a hole (radius = 4 cm) at its bottom into the spherical vessel at a volumetric flowrate of:

    whereAis the area of the hole, gis the acceleration due to gravity, and Cd is an

    experimentally determined value that depends partly on the type of fluid (for water, Cd =

    0.6). Water then flows out of the spherical vessel at a flow rate of F2. We wish to study the

    dynamics of the liquid heights in the two vessels using MATLAB.

    The following data are known about the system:

    Cvalve= 110-3

    m3/Pa

    1/2-min (characteristic valve constant)

    Cross-sectional area of the rectangular vessel = 4 m2

    Radius of sphereR= 2 m P2= 1.01325105Pascal * (water)= 1000 kg/m3

    CV(air heat capacity at constant volume) = 20850 J/kmol-K

    Initially at t= 0,z1= 6 m,z2= 2 m, P0= 1.01325105Pascal, TG= 303.15 K

    Gravitational acceleration g= 9.80665 m/s2= 35303.94 m/min2

    Universal gas constantR= 8314 m3-Pa/kmol-K = 8314 J/kmol-K

    11 2gzACF d=

    F1

    F2

    P2P1

    z1AirP0

    z2

    Water

  • 8/13/2019 CHE654 Problems 2012

    38/65

    38

    Conversion factors: 1 Pascal = 1 N/m2= 1 kg/m-s

    2, 1 N = kg-m/s

    2, 1 J = kg-m

    2/s

    2

    Liquid volume inside a sphere as a function of liquid heightzis given by:

    Derive an ODE forz2as a function of time (withoutz1in the ODE) and use MATLABs

    ode45 to simulate its dynamics until either the rectangular vessel dries up or the spherical

    vessel is full. You must simplify your final ODE as much as possible before using it in

    MATLAB. Note that ode45may result in solutions with imaginary parts. You can ignore

    them as long as the values are small which come from inherent problems in numerical

    integrations. Hint:Be very careful with your units and their conversions.

    Answer the following questions:

    Time at which the rectangular vessel dries up or the spherical vessel is full (whichever is

    smaller) = ____________ minutes

    44.Modeling Liquid Heights in a Two-Vessel SystemConsider two tanks in series as shown where the water flow out of the first tank enters thesecond tank. The first tank is a cubic vessel with a width of 10 ft, a length of 10 ft, and a

    height of 10 ft, whereas the second tank is a cone-shaped vessel with a radius of 5 ft at the

    top and a height of 20 ft. The first tank is filled with water at a volumetric flow rate F1and

    is drained through a hole (radius = 1 inch) at the bottom. Studies in fluid mechanics haveidentified the relation between the volume flow through the bottom hole and the liquid

    height as:

    whereAis the area of the hole, gis the acceleration due to gravity (32.2 ft/sec2), and Cd is

    an experimentally determined value that depends partly on the type of fluid (for water, Cd =

    0.6). Initially at t = 0, the cubic tank is filled with 2 ft of water and the cone-shaped tank is

    filled with 15 ft of water.

    12 2gzACF d=

    3

    32 zzRV =

  • 8/13/2019 CHE654 Problems 2012

    39/65

    39

    (a)Derive an analytical expression of liquid heightz1of the cubic tank as a function oftime. Doesz1ever reach the steady-state, and if so, what is this value? Based on your

    analytical answer, also comment on whetherz1reaches a maximum, reaches a

    minimum, overflows, or goes to zero and the time for that to happen. In your derivation,

    you are not allowed to use tables of integrals to perform the integration. Instead, use

    substitution and be careful with your unit conversions.

    (b)Derive an ODE that describes the liquid heightz2in the second tank. Together with theODE forz1in Part (a), use MATLAB (ode45) to solve forz2 as a function of time and

    plot bothz1 andz2 as a function of time. Run the simulation for 20 minutes.

    Answer the following questions:

    z1(t= 10 minutes) = ____________ ft z2(t= 10 minutes) = ____________ ft

    45.Modeling Concentrations of Water and Methanol in a Two-Tank SystemConsider a system of two interconnecting two tanks as shown below, in which pure water

    flows continuously into Tank 1, while pure methanol flows continuously into Tank 2. The

    flow rates into and out the two tanks are shown in the figure in terms of kg/min.

    F2

    F1= 15 ft /min

    z1

    z2F3= 20 ft

    3/min

  • 8/13/2019 CHE654 Problems 2012

    40/65

    40

    At t= 0, Tank 1 is filled with 10 kg of pure methanol, while Tank 2 is filled with 100 kg of

    pure water. We definex1as the mass fraction of water in Tank 1 andx2as the mass fractionof methanol in Tank 2 at any given time t.

    (a)Derive analytically an expression forx2, the methanol mass fraction in Tank 2, as afunction of time.

    (b) Using the result in Part (a), derive an ODE forx1, the water mass fraction in Tank 1, as a

    function of time. Then use MATLAB (ode45) to solve the ODE by running thesimulation from t= 0 to t= 20 minutes (Why do we only run the model up to 20 minutes

    and not more?). Also, make a plot ofx1versus time.

    Answer the following questions:

    x2(t= 10 minutes) = _______________ x1(t= 10 minutes) = _____________

    Why shouldnt we run the model in Part (b) beyond 20 minutes?

    _____________________________________________________________________

    46. Simultaneous Mass and Energy Balance

    Consider the following heating tank problem. A dilute solution at 20 C is added to a well-stirred tank at the rate of 180 kg/hr. A heating coil having an area of 0.9 m2is located in thetank and contains steam condensing at 150 C. The heated liquid leaves at 120 kg/hr and atthe temperature of the solution in the tank. There is 500 kg of solution at 40 C in the tankat the start of the operation. The overall heat-transfer coefficient is 342 kcal/hr-m

    2-C and

    the heat capacity of water is 1 kcal/kg-C.

    Water, 4 kg/min MeOH, 3 kg/min

    2 kg/min6 kg/min

    x2x1

    Tank 1 Tank 2

  • 8/13/2019 CHE654 Problems 2012

    41/65

    41

    H= 2 m

    R= 0.5 m

    F1= 8 + 0.2t

    F2= 10 kg/min

    z

    20 C180 kg/hr

    120 kg/hrT (Temperature)

    150 C0.9 m2

    (a)Develop a system of mathematical equations to model this system. We are interested indetermining the temperature of the solution in the tank at any given time.

    (b) Solve for the temperature in the tank after 1 hour of heating. An analytical solution is

    possible for this particular system.

    (c)Use MATLAB to solve for the temperature in the tank after 1 hour, and compare theanswer with the exact solution in Part (b).

    47.Mass and Energy Balance in an Open Cone-Shaped VesselConsider a conical open vessel as shown in the following figure. The vessel has a radiusR

    at the top and a heightH. Methanol flows into the vessel at a rate of F1(in kg/min) as afunction of time, and it flows out at a constant rate of F2(also in kg/min). At t= 0, the

    liquid height is 1 meter. Note that the liquid height will initially go down and then go up,

    which causes the vessel to eventually overflow.

  • 8/13/2019 CHE654 Problems 2012

    42/65

    42

    The following data are available on methanol:

    TB = 64.75 C &= 23.4 kmol/m3 MW = 32.04 kg/kmol CP= 2707.55 J/kg-C

    (a)Assuming the vessel is not heated, first derive an analytical expression forz, the liquidheight, as a function of time t. Then use the expression to answer the following

    questions. Do not use MATLAB for this part, although you could use it to verify your

    analytical answer. Hint: Be very careful in solving the mass balance correctly;otherwise, your energy balance in Part (b) will be wrong.

    Answer the following question:

    Time to reach minimum liquid height = ___________ minutes

    Minimum liquid height = ___________ meters

    Time at which the vessel overflows = ____________ minutes

    z

    Note that the volume of a cone is V= )0AC(z)dz, whereAC(z) = cone cross-sectional

    area and is a function ofz.

    (b)Consider the same problem in Part (a) again. This time, the vessel is jacketed withsteam condensing at 100 C and a heat transfer coefficient of U= 30000 J/min-m2-Cproviding the heat. The initial temperature of the liquid at t= 0 is 30 C, while thetemperature of the inlet flow is maintained at 20 C. Use MATLAB to determinewhether the vessel will overflow first or the temperature of methanol will reach its

    boiling point TBfirst. Assuming that the vessel doesnt overflow, how long does it take

    for the liquid to reach TB? Note that the heat transfer areaATshould not be treated asconstant. z

    The surface area of a coneATat any heightz= )02r dz

    Answer the following questions:

    Check one: O Vessel overflows first O Tof methanol reaches its TBfirst

    Time to reach TB= ______________ minutes

    48. Energy Balance in a Two-Tank SystemConsider the following two-tank system in which water in the first tank flows into the

    second one with a flow rate of F1= 2 kg/min and vice versa with a flow rate F2= 2 kg/min.

    Water in both vessels is being heated with a heating coil with the same constant heat

    transfer area ofA= 0.5 m2and the same heat transfer coefficient of U= 4 kcal/m

    2-min-C.

  • 8/13/2019 CHE654 Problems 2012

    43/65

    43

    However, the temperature of the heating coil in Tank 1 (100 C) is lower than that of theheating coil in Tank 2 (120 C). We defineM1, T1,M2, and T2as the mass and thetemperature of water in the first vessel and in the second vessel, respectively.

    (a)Using the following data about the system, derive two ODEs that describeT1and T2as afunction of time.

    CP(water) = 1.0 kcal/kg-C

    Initially at t= 0:M1= 50 kg of water, T1= 20 C,M2= 100 kg of water, T2= 10C

    (b)Solve the two ODEs in Part (a) and derive an analytical expression for T1and T2as afunction of time.

    (c)What is the domain of this system, i.e. the maximum time the derived model is validfor? Also, determine the time at which the temperatures in Tank 1 and Tank 2 are equal.

    Answer the following questions:

    Domain of this system = ____________ minutes

    T1= T2= ____________ C when t= ____________ minutes

    49.Mass and Energy Balance in a Stirred Tank HeaterConsider the following stirred tank heater shown below, where the tank inlet stream isreceived from another process unit. A heat transfer fluid is circulated through a jacket to

    heat the fluid in the tank. Assume that no change of phase occurs in either the tank liquid or

    the jacket liquid. The following symbols are used: Fi= volumetric flowrate of stream i, and

    Ti= temperature of stream i.

    F2

    M2 T2F1

    M1 T1

    Tank 1 Tank 2

  • 8/13/2019 CHE654 Problems 2012

    44/65

    44

    Tank Inlet F1 T1

    Jacket Inlet

    F3 T3

    Jacket Outlet V T Tank Outlet

    F4 T4 Jacket Vj F2 T2

    Additional assumptions are:

    1.The liquid levels in both the tank and the jacket are constant.2. There is perfect mixing in both the tank and the jacket.

    3. The rate of heat transfer from the jacket to the tank is governed by the equation Q =UA(T4 T2), where U is the overall heat transfer coefficient and A is the area of heat

    exchange.

    (a)Write the dynamic modeling equations (ODEs) to find the tank and jacket temperatures.Do not use any numerical values leave these equations in terms of the process

    parameters and variables. Be sure to define any new symbols you introduce into the

    equations.

    (b) Assume that both the tank fluid and the jacket fluid are water. The steady-state values ofthis system variables and some parameters are:

    F1= 1.0 ft3/min &CP(in tank) = &CP(in jacket) = 61.3 Btu/F-ft

    3

    T1= 50 F T2= 125 F V = 10 ft3

    T3= 200 F T4= 150 F Vj= 1 ft3

    Solve for F3and UA (show units) at steady-state.

    (c) If initially (t = 0), T2= 50 F and T4= 200 F, solve for T2and T4from the ODEs in Part(a) analytically as a function of time.

    50. Mass and Energy Balance in a Gas Surge DrumConsider a gas surge drum with variable inlet and outlet molar flowrates, qfand q,

    respectively. Assume that heat is being added to the tank at a rate of Q and ideal gas

    behavior in the drum.

  • 8/13/2019 CHE654 Problems 2012

    45/65

    45

    Tf , qf, Pf q, P, T

    (a)Write the modeling equations (ODEs) that describe how the temperature, T, andpressure, P, inside the drum vary with time. Note that for a gas, the accumulation term

    on the left-hand side of the energy equation is

    dH d(PV) = energy in energy out

    dt dt

    where dH/dt = d(&CPVT)/dt and CPis assumed constant. For liquids, the d(PV)/dt termis considered negligible (incompressible fluid and constant volume). So do not forget thePV term in your energy balance.

    (b) Solve the two ODEs in the Part (a) using MATLAB and find the values of Pand T after

    10 minutes. The data are:

    V = 100 m3 R = 8.205x10

    -2m

    3-atm/kmol-K

    = 8.315 kJ/kmol-K

    CP(gas) = 125 kJ/kmol-K qf = 1.0 kmol/min

    Tf= 25 C q = 0.5 kmol/minQ = 1.5x104kJ/min T(t=0) = 298.15 K = 25 CP(t=0) = 1 atm

    51. Mass and Energy Balance in a 2-Tank SystemConsider the following 2 tanks (both cylindrical vessels) in series used to store a liquid

    solution. Tank 1 is heated while Tank 2 is not. Liquid is drawn from Tank 1 into Tank 2 at

    the rate of 10 kg/min. At the same time, a feed (40 C) enters Tank 2 at the rate of 20kg/min, and an outflow of 30 kg/min leaves the vessel. Initially (at t = 0), Tank 1 is charged

    with 300 kg of the solution at a temperature of 20 C, while Tank 2 is charged with 100 kg

    at a temperature of 30C.

    20 kg/min

    Tank 1 Tank 2 40 C

    T1

    T2

    10 kg/min 30 kg/min

    P, V, T

  • 8/13/2019 CHE654 Problems 2012

    46/65

    46

    (a) Assuming that Tank 1 is being heated with a heating coil that remains submerged at alltimes (hence, the heat transfer area remains constant), derive an analytical expression

    for T2, the temperature inside Tank 2 as a function of time. Also, compute T2at the

    time when Tank 1 is completely emptied. Use the following data:

    CP= liquid heat capacity = 2.0 kJ/kg-C UA = 40 kJ/min-CTS= heating coil temperature = 200 C

    Assume there is no phase change in either tank (i.e. no boiling occurs).

    (b) Consider again a similar 2-tank system in which Tank 1 is jacketed and is heated with

    steam at 200 C as shown in the figure below. In this case, the heat transfer area is nolonger constant and will vary with the liquid volume inside Tank 1.

    20 kg/min

    40 C

    T1

    Steam T2

    10 kg/min 30 kg/min

    This liquid solution is known to boil at 150 C. Determine the time it takes for the liquidin Tank 1 to boil off completely (including the time to heat the liquid to the boiling

    temperature). Use the following data:

    CP= liquid heat capacity = 2.0 kJ/kg-CU = overall heat transfer coefficient = 25 kJ/m

    2-min-C

    TS= steam temperature = 200 C*= liquid mass density = 1200 kg/m3R = radius of both cylindrical vessels = 0.3 m

    = heat of vaporization at 150 C = 1500 kJ/kgUse the initial conditions given in Part (a)

    52. Boiling of Ethanol in a Cylindrical VesselConsider the following cylindrical vessel which is initially filled with 100 kg of ethanol at

    the temperature of 20 C. The vessel is constantly being heated with a heating coil (assumeconstant heat transfer area) at T= 100 C and UA= 10 kJ/min-C. The heating goes onuntil ethanol starts to boil at its normal boiling point of 78.55 C. While the heating istaking place and then later when boiling occurs as well, ethanol also flows out of the vessel

    at the rate of F1. Use the following additional data about ethanol to calculate the time it

  • 8/13/2019 CHE654 Problems 2012

    47/65

    47

    takes for ethanol to completely disappear from the cylindrical vessel. Also, how much

    faster does the boiling help in emptying the vessel?

    MW(molecular weight) = 46.07 +(heat of vaporization) = 38600 kJ/kmol

    CP(heat capacity) = 78.28 kJ/kmol-C

    Hint:Watch the units and their conversions carefully in your calculations

    Answer the following question:

    Time when ethanol disappears completely from the vessel = ____________ minutes

    Time by which the boiling helps the vessel to empty faster = ____________ minutes

    53. Boiling and Draining of Ethanol in a Spherical VesselConsider the boiling of pure ethanol in a jacketed spherical vessel with a radiusR = 1 meter,

    as shown in the diagram. The liquid is drained at the bottom of the vessel while some of it

    is boiled and escapes as vapor through the top of the vessel.

    Steam TS

    1

    z

    CV

    1 atm

    v

    P0

    v when boiling occurs

    F1= 2 kg/min

  • 8/13/2019 CHE654 Problems 2012

    48/65

    48

    The following data are available:

    MW = 46.07 (TB) = 3.858x107J/kmol&= 16.575 kmol/m3 CP= 1.4682x10

    5J/kmol-C

    log10Pvap

    = 8.04494 __1554.30__ T in C and Pvapin mmHgT + 222.65

    CV= 4.5 m3-atm

    -1/2/hr = valve constant

    TS= 100 C U = 2.0x106J/hr-m2-C

    P0= 1 atm z0= z(t=0) = 1 m

    (a)Model this operation and use MATLAB to determine the time it takes for the vessel tocompletely empty, assuming that initially the liquid is at its boiling point. Note that the

    heat transfer area ATis not constant.

    (b)Repeat the calculations in Part (a), assuming that there is no draining of the liquid at thebottom (i.e. the liquid leaves the vessel only through boiling). Determine the solution

    analytically (an exact solution is possible in this case).

    Useful conversion factors and formulae:

    g = gravitational constant = 9.807 m/s2

    1 atm = 1.01325x105N/m2 1 N = 1 kg-m/s2

    The volume of liquid V(z) in a spherical vessel as a function of its height z is given by

    V(z) = Rz2 z33

    while the surface area S(z) is given by

    S(z) = 4Rz z

    54.Boiling of Water in a Closed Cylindrical VesselA closed cylindrical vessel (R= 0.5 m andH=5.0 m) contains 500 kg of water at its boiling

    temperature of 100 C (373.15 K) as shown in the figures below. Lets assume that initiallyat t= 0, the water (500 kg) is already at 100 C and starts to boil. Initially, there is also 5 kgof water vapor (or steam) in the gas phase of the vessel. We assume the water vapor is an

    [ ]) ++=+ 2 )ln(b bxaabxadxbxa x

  • 8/13/2019 CHE654 Problems 2012

    49/65

    49

    ideal gas and that the temperature in the gas and liquid phases are always in thermal

    equilibrium at 100 C.

    The following data are also known about water:

    MW(molecular weight) = 18.015 kg/kmol * (mass density)= 1000 kg/m3

    +(heat of vaporization) = 2256.84 kJ/kg CP(liquid heat capacity) = 4.1813 kJ/kg-KR (universal gas constant) = 0.08206 atm-m

    3/kmol-K

    This problem is divided into two parts, namely Part 1 and Part 2.

    Part 1: In this part, water is being boiled by a heating coil at TS= 200 C with a constantheat transfer areaA= 2.0 m2and an overall heat transfer coefficient U= 100 kJ/min-m2-Cas shown in the figure for Part 1.

    (a)Derive an analytical expression of the liquid heightzas a function of time.(b)Derive an analytical expression of the water gas pressure PGas a function of time. Plot your

    analytical solution in MATLAB and run the model until all the water has vaporized. Hint: Youmay check the correctness of your analytical solution by checking PGat t= 0 and at twhen all

    water has been vaporized.

    Answer the following questions:

    How long does it take for water in Part 1 to boil off completely? ____________ minutes

    What is the gas pressure in Part 1 at the following conditions?

    (i) PG= ____________ atm after 30 minute

    Water VL

    v

    z

    PG VG

    Figure for Part 1 Figure for Part 2

    Steam

    vPG VG

    VLWater

  • 8/13/2019 CHE654 Problems 2012

    50/65

    50

    (ii) PG= ____________ atm when water has boiled off completelyPart 2: Now, lets study the same system in which the cylindrical vessel is being heated by

    steam in a jacketed chamber as shown in the figure for Part 2. In this case, the heat transfer areadecreases with the liquid height and is no longer constant. The heating now comes from the

    surrounding wall and the bottom of the vessel. We assume Uand TSto be the same as in Part 1.

    (a)Derive an analytical expression of liquid volume VLas a function of time.(b)Derive a single ODE for the gas pressure PGusing the analytical expression in Part 2(a). Then

    use MATLAB (ode45) to solve the ODE for PGfrom t= 0 to twhen all liquid is gone, and

    make a plot of the PGprofile. Note that the final value of PGwhen the vessel contains only gasin Part 2(b) should be equal to that in Part 1(b).

    Answer the following questions:

    How long does it take for water in Part 2 to boil off completely? ____________ minutes

    What is the gas pressure in Part 2 at the following conditions?

    (i) PG= ____________ atm after 30 minutes(ii) PG= ____________ atm when water has boiled off completely

    55.Boiling of Acetone in a Cylindrical and a Spherical Vessels in SeriesConsider the boiling of pure acetone in a jacketed cylindrical vessel and a jacketed spherical

    vessel in series, as shown in the diagram. The cylinder has a radius of R1= 1.0 m and aheight of H = 1.5 m, while the sphere has a radius of R2= 1.0 m. In addition to the liquid

    already in the vessel, pure acetone at its boiling point is added continuously at a rate F 1= 15

    m3/hr. The cylinder also has a hole at the bottom, which allows acetone to flow out and into

    the sphere according to the relation

    F2= CdA(2gz1)1/2 (in m3/hr)

    whereAis the area of the hole,gis the acceleration due to gravity, and Cd is anexperimentally determined value.

  • 8/13/2019 CHE654 Problems 2012

    51/65

    51

    F1= 15 m3/hr at 56.0 C

    Steam at TS1

    H

    z1

    F2

    Steam at TS2

    z2

    The following data are available:

    MW = 58.08 &= 13.62 kmol/m3(TB) = 3.02x10

    7J/kmol TB= 56.0 C

    CP= 1.30735x105J/kmol-C U = 3.0x106J/hr-m2-C (for both vessels)

    TS1= 150 C TS2= 100 CCd= 0.5 g= gravitational constant = 1.271x10

    8m/hr

    2

    r= hole radius = 0.01 m

    z1(t=0) = 0.5 m z2(t=0) = 1.5 m

    (a)Model this operation and determine the time in hours (correct to 2 decimal places) atwhich the cylindrical vessel will either empty completely or overflow. Assume that the

    liquid in both vessels is already at its boiling point at

    t = 0.

    (b)Determine the time in hours (correct to 2 decimal places) at which the liquid height z1inthe cylinder is equal to the liquid height z2in the sphere.

    v1

    R2

    v2

  • 8/13/2019 CHE654 Problems 2012

    52/65

    52

    56. Semi-Batch Reactor with a Single 1st

    -Order ReactionConsider the case where a batch reactor is being filled. Assume a single, first-order reaction

    (A ,B) and a sinusoidal volumetric flowrate into the reactor F = 4.0 + 2sin(10t) with noflow out of the reactor.

    F

    CAF

    A B

    If CAF(feed concentration) = 5 mol/m3, k = 1 hr

    1, with V = 2.0 m

    3and CA= 0 at t = 0,

    simulate the concentration of A as a function of time using MATLAB. Run the model for

    10 hours and plot the concentration profile.

    57. Batch Reactor with a Series ReactionConsider the series reaction:

    k1 k2 k3A , B , C , D

    (a)Assuming that each of the reactions is first-order and constant volume, write down themodeling equations for CA, CB, and CC, where CA, CB, and CCrepresent the

    concentrations (mol/volume) of components A, B, and C, respectively.

    (b)Derive a third-order ODE for the concentration of C. That is, your ODE should looklike

    f( d3CC, d

    2CC, dCC, CC, k1, k2, k3 ) = 0

    dt3 dt2 dt

    (c) If k1= 1 hr1

    , k2 = 2 hr1

    , k3= 3 hr1

    , and CA0= CA(t=0) = 1 mol/liter, solve the ODE

    in Part (b) analytically for the concentration of C at any given time t.

    58.Batch Reactor with a Series ReactionConsider a batch reactor with a series reaction where component A reacts to form

    component B. Component B can also react reversibly to form component C. The reactionscheme can be characterized by:

  • 8/13/2019 CHE654 Problems 2012

    53/65

    53

    k1 k2f

    A B Ck2r

    Here k2fand k2rrepresent the kinetic rate constants for the forward and reverse reactions forthe conversion of B to C, while k1represents the rate constant for the conversion of A to B.

    (a)Assuming that each of the reactions is first-order and constant volume, write down the 3modeling equations for CA, CB, and CC, where CA, CB, and CCrepresent the

    concentrations (mol/volume) of components A, B, and C, respectively.

    (b)Using the following definitions:

    Dimensionless time, - = k1tConversion of A, x1= (CA0 CA) / CA0Dimensionless concentration of B, x2= CB/ CA0

    Ratio of rate constants, = k2f/ k1Ratio of forward and reverse rate constants, = k2r/ k1

    Derive a second-order ODE for the dimensionless concentration of B. Your ODE must

    contain only dimensionless quantities (x2, -, , and ).

    (c)Solve the ODE in Part (b) analytically to find x2as a function of -, , and .(d)Using the following data:

    k1 = 1.0 min-1

    k2f = 1.5 min-1

    k2r = 2.0 min-1

    CA0= CA (t = 0) = 3.0 mol/liter

    CB0 = CB (t=0) = 0 mol/liter

    CC0 = CC (t=0) = 0 mol/liter

    Solve for CBanalytically as a function of time.

    (e)Given the data in Part (d), find the maximum concentration of B and the reaction time atthis concentration. If no such maximum exists, prove it mathematically. Repeat the

    above calculations for the case of k1= 3 min-1, k2f= 1.5 min

    -1, k2r= 1 min-1while the

    initial conditions remain the same.

    (f)Validate your analytical solutions by solving the differential equations in Part (a) withMATLAB and plot the time profiles of components A, B, and C. Use both sets of rate

    constants (i.e. k1 = 1.0 min-1

    , k2f = 1.5 min-1

    , k2r = 2.0 min-1

    and k1 = 3.0 min-1

    , k2f = 1.5

    min-1

    , k2r = 1.0 min-1

    ).

    59. Modeling an Isothermal Serial ReactionConsider an isothermal batch reactor with the following two reactions in series:

  • 8/13/2019 CHE654 Problems 2012

    54/65

    54

    k1 k3

    A B Ck2 k4

    Both reactions are reversible. The forward reaction in the first reaction is zero-order while

    the remaining three reactions follow the stoichiometry. That is,

    (a)Derive a second-order ODE of CBas a function of time. Note that your final ODE for CBmust be expressed in terms of k1, k2, k3, and k4.

    (b)Given that k1= 4.0 gmol/liter-hr, k2= 2.0 hr-1, k3= 1.0 hr-1, k4= 2.0 hr-1, and CB(t= 0) =CC(t= 0) = 0, solve for an analytical expression of CBas a function of time. Does CBgothrough a maximum or minimum? If yes, determine the time at which this

    maximum/minimum occurs.

    (c)Given that CA(t = 0) = CA0= 5 gmol/liter, derive an analytical expression for CAand CCas a function of time.

    Answer the following questions:

    CA(t= 1 hr) = _______________ gmol/liter CB(t= 1 hr) = _______________ gmol/liter

    CC(t= 1 hr) = _______________ gmol/liter

    Does CBgo through a maximum or minimum? Yes _____ No _____

    If yes, the time at which the maximum/minimum occurs = ____________ hour

    60.Isothermal Semi-Batch Reactor(a)Consider an isothermal semi-batch reactor where a single reaction takes place in a

    solvent S, which is inert. In this reaction, 2 moles of component A react with one

    CBC

    CBBB

    BA

    CkCkdt

    dC

    CkCkCkkdt

    dC

    Ckkdt

    dC

    43

    4321

    21

    =

    +=

    +=

  • 8/13/2019 CHE654 Problems 2012

    55/65

    55

    k1mole of component B to form one mole of component C: 2A + B -----> C. Thereaction rate does not conform to the stoichiometry but is 1st-order with respect to each

    reactant as follows: rA= k1CACB

    FA= 15 liter/min FB= 10 liter/min

    Initially (t = 0 min), the reactor contains 100 liters of solution and 300 moles of A.Assuming that all components have the same density of 60 mol/liter, derive 3 ODE

    equations needed to compute CA, CB, and CC, the concentrations (moles/liter) of A, B,and C, respectively. Use ode45in MATLAB to solve for and plot (in a single graph) the

    concentrations of the 3 components. Run the model for 20 minutes with an increment of

    0.5 minute.

    The following experimental data have been obtained for this reaction when carried out in

    a batch reactor:

    Time(minute) 0 5.0 7.5 12.0 15.5 25.0 32.0 40.0

    CA(mol/liter) 2.0 1.65 1.52 1.40 1.28 1.17 1.10 1.06

    CB(mol/liter) 0.5

    (b)At the end of 20 minutes, the 2 feeds to the reactor are suddenly shut off, and 4,500moles of a new component called D (same density as components A, B, and C) are

    charged to the reactor. That is, the reactor now operates in a batch mode. Component Dreacts with component C to form A and B, and the reaction now looks as follows:

    k1

    2A + B C + Dk2

    with a reaction rate of rA= k1CACB+ k2CD(2nd

    -order forward and 1st-order reverse).

    The value of k2has been measured to be 1.0 min-1

    . Derive analytically theconcentration of A as a function of time, and compute CAat steady state based on your

    derived equation. Your final expression should be simplified as much as possible and

    should not contain any paramete