dyflo case study probelms

Upload: ralphmarrugo

Post on 02-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Dyflo Case Study Probelms

    1/24

    DYFLO CASE STUDY PROBELMS

    Problem (Example 4 - 12 of Smith )

    Acetic anhydride is hydrolyzed at 40 C in a semibatchreactor. First the reactor is charged with 10 liters of waterand heated to 40 C. At time t=0, a charge of acetic anhydridesufficient to make the solution strength 0.5 x 10 guateanhydride/cm is added. A feed solution containing 3 x 10guale anhydride/cm is also added at this time at a rate of 2liters/min. Product is withdrawn at the same rate. Densityis considered constant.

    Determine the concentration of the solution leaving thereactor as a function of time. The rate of reaction isr=.380C guales/cm min where C = guale anhydride/cm

    Differential EquationsA mass balance on acetic anhydride gives

    QC - QC - rv = Vdcdt

    Rearranging and substituting for r gives

    dC = QC - QC -.380Cdt V V

    Q = 2 litres/minV = 10 litresC = 3.0 x 10 gnale/cmC (o) = .5 x 10 gnale/cm

    Substituting in for these values gives

    d = 6.0 x 10 - 0.58 Cdt

    This simple first order differential equation can now besolved using the methods presented earlier.

    Solution

    The equation for the DYFLO solution was scaled up forplotting purposes since the lowest number than can be labelledon the plot axis using the plotting routine available is .001.

    dc = 6.0 - .580 C where C = gnates anhydrides/cmdt x 10

    of this problem is arrangedas follows.

  • 8/10/2019 Dyflo Case Study Probelms

    2/24

    An explanation of the variable names and listings of thesubroutines is supplied in Appendix C. Basically, the programproceeds as follows.

    1) initialize variables

    2) Calculate dl from initial conditiondt

    3) Print the desired variables at the specified printinterval.

    4) Save the variable to be plotted.

    5) Increment the independant variable (time) using thespecified integration interval and order of integration.

    6) Calculate the value of the concentration at the new timeinterval, then go back to step 2 unless finished.(integration of dependent variable)

    7) When finished (t = 15.0) , NF = 2, plot the results on theplotter. Automatic scaling and scale-sizing is provided,only the plot labels need to be specified in the

    subroutine DATA statement).Figure 3 shows the results of the plotting of C vs time,

    and the following table gives the results printed on theprinter. the total time period to use was determined by trialand error, the time increment to use for the desired accuracywas also determined by trial and error. (See appendix C fordiscussion of the best way to determine these values)

  • 8/10/2019 Dyflo Case Study Probelms

    3/24

    Problem 2

    The following irreversible chemical reactions take placein a batch reactor.

    A + B K 2CB + C K 2DD k E

    The above equation can be taken as the actual reactionmechanism. At the temperatures involved the rate constantshave the following values.

    K = 0.240 mole %/minuteK = 0.120 "K = 6.00 "

    Determine the optimun initial concentration of componentsA and B and the reaction time required to produce the maximumyield of product D. all of the variables are expressed as %of (A + B) where A + B = 100

    Different Equations

    The following differential equations can be obtained byinspection assuming simple second and first order reactions.

    dA = -k ABdt

    dB = -k AB - k BCdt

    dc = 2k AB - k BCdt

    dD = 2k BC - k Ddt

    dE = k Ddt

  • 8/10/2019 Dyflo Case Study Probelms

    4/24

    Solution

    The differential equation can be used in their originalform, and extended directly into the derivative section of theDYFLO routine. These equations are than integrated in theintegration section using a 4th order integration. Theprogram iterates between the derivative and integrationsection until the integration is complete.

    After each integration "run", the maximum value of Dwhich was saved in PLOTV, is compared to the previous maximumvalue. Using this comparision a simple search is performed byvarying A . A is increased until the optimum is straddled,then the interval is repeatedly cut in half as the searchcontinues.

    For the first search, a first order integration and atime interval of .03 minutes was used to get a rough idea ofthe optimum position. To find the optimum, the time intervalwas decreased to .006, the initial search step size wasreduced to 1.0 from 10.0, and the search was initiated at the

    "rough" optimum position of A = 25%. The results of thesearch gave A = 26.05, B = 73.95 at t = .198 minutes:

    Figure 12 shows the plot of the first guess used fortotal time interval and integration interval.

    (note that the automatic scale-size subroutine adjusts theY-axis length to provide a reasonable plot usage).PROBLEM #3

    It is proposed that the pilot plant production of allylchloride be conducted in a vertical 2 mch. ID tube. Thereactants will consist of 4 moles propylene (C H )/molechlorine (Cl ) and enter the reactor at 200 C. For a combinedfeed rate of .85 16 mole/hr, determine the conversion of allylchloride as a function of tube length. The pressure may beassumed constant and equal to 29.4 psa. The reactants will bepreheated separately to 200 C and mixed at the entrance to thereactor. At this low temperature explosion difficulties onmixing are not serious. The reactor will be jacketed withboiling ethylene glycol so that the inside wall temperaturewill be constant and equal to 200 C. The inside heat trasnfercoefficient may be taken as 5.0 BTU/hr ft. F.

    The three reactions involved in allylchloride formationare:

    1. Cl + C H ---------- CH = CH - CH Cl + HCl(ally chloride)

    2. Cl + C H ---------- CH Cl = CHCl - CH(1,2 - dichloropropane)

    3. Cl + CH = CH - CH Cl ---------- CHCl = CH - CH Cl + HCl(1,3 dichloropropane)

    To simplify the kinetic treatment, consider only the

  • 8/10/2019 Dyflo Case Study Probelms

    5/24

    first two reactions. The heats of reaction in cal/g-mole aregiven in Table 1. The mold heat capacities will be assumedconstant and equal to the values given in Table 2.

    Consider the proposed rate equations for reactions 1 and2 as:

    r = 206,000 exp. (-27000/RT) P P

    r = 11.7 exp. (-6860/RT) P P

    where r , r = 16 moles Cl /hr - ftT = RP = partial pressure in atmospheres.

    Determine temperature and conversion as function ofreactor length.

    TABLE 1 TABLE 2

    H 273 K 355 K Component C Btu/(lb mole)( R)

    Reaction 1 -26,800 -26,700 Propylene (g) 25.3Chlorine (g) 8.6

    Reaction 2 -44,100 -44,000 Hydrogen chloride (g) 7.2Allyl chloride (g) 28.01.2-Dichloropropane (g) 30.7

    Solution:

    Consider:

    reaction 1. A + B ----- C + Dreaction 2. A + B ----- E

    where A = Chlorine (Cl )B = propylene (C H )C = allyl chloride (CH = CH - Ch Cl)D = hydrochloric acid (HCl)E = 1,2 dichlorpropane (CH Cl = CHCl - CH )

    Assume: constant pressureconstant heat of reaction

  • 8/10/2019 Dyflo Case Study Probelms

    6/24

    constant wall temperature (and uniform for all2)plug flowconstant feed rateideal gasesconstant heat transfer coefficient for all 2R = 1.987 B+u/16 mole RTo = 200 C = 392 F = 852 RP = 29.4 para = 2 atmTw = 200 C = 852 Rhi = 5.0 BTU/hr ft Fd = Inside diameter of reaction = 2 = .1662

    ft.

    F = F = .55 1y moles/hr.

    F is 4 moles B/mole A

    .. . F = 1/5 F = .2 x .85 = .17 16 moles A/m

    F = 4/5 F = .8 x .85 = .68 16 moles B/m

    A is the limiting reagent since A and B react in a 1:1 ratio,but exist in the feed stream 1:4. . . Do balances forcomponent A.

    Mass balance for A over volume clement dv for reaction 1:

    Input + Generation = Output + Accumulation

    Input = FAOutput = FA + dFAGeneration = -r dVAccumulation = 0

    .. . FA - r dV - FA + dFA

    Let X = conversion of A due to reaction 1

    then FA = F (1-X )dFA = d(F (1-X )) = -F dX

    .. . r dV = F dX

    dV = A dwhere A = cross sectional area

    = (ID) = (.1667) = .02182 Ft4 4

    .. . dX = r A d

    F

  • 8/10/2019 Dyflo Case Study Probelms

    7/24

    where r = 2.06 x 10 exp (-27000/RT) P P

    Mass balance for A over volume element dV for reaction 2

    I + G = O + A

    I = FO = F + dFG = -r dVA = O

    Let X = conversion of A due to reaction 2

    then F = F (1-X )dF = -F dX

    .. . r dV = F dX

    dX = r A dF

    r = 11.7 exp (-6860/RT) p p

    P = F PF

    P = F PF

    At any position z

    moles of A/time = F - F X - F X = F (1-X -X )

    moles of B/time = f - F X - F /x = 4F X - F X =F (4-X -X )

    moles of C/time = F + F X + F X = F (X +X )

    moles of D/time = moles of C/time = moles of E/time =F (X +X )

    .. . F = F - F X - F /x + 4F - F X - F X

    = 5F + F X + F X = F (5 + Y + X )

    .. . P = F (1-X -X ) Pt = (1-X -X ) x 2

    F (5+X +x ) (5+X +X )

    = 2(1-X -X )(5+X +X )

    P = 2(4-X -X )5+X +X

  • 8/10/2019 Dyflo Case Study Probelms

    8/24

    .

    . . dX = 2.06x10 exp (-27000/RT)

    | 4(1-X -X ) (4-X -X ) | A dz| (5+X +X ) | F

    dX = 11.7 exp (-6860/RT)

    |4(1-X -X )(4-X -X ) | A dz

    Energy Balance

    Input + Output = Generation & Accumulation

    Assuming a reference temperature at zero:

    I = m cpave T0 = m cpave (T+TdT) + QG = ((-OH )r + C-OH )r ) dvA = 0

    Q = h A (T-Tw)= h dz d (T-Tw)where d = .1667 ft.

    h = 5.0

    .. . m cpave T + (1- H )r +(-OH )r )dv=m cpave T+h d(T-Tw)dz

    V = A d

    .. . dT = ((- H )r +(-OH )r ) Axdz - hi d(T-Tw)dz

    m cpave m cpave

    m = F M PF M

    = .17 l6 mole Cl x 70.9 16 mol Cl +.68 16mole C H xhr 16 mol Cl2 m

    42.08 16m C H16 mole C H

    = 40.67 16m/hrn

    Cpave = yi Cp i

    i=1

    where yi = Fi/F = mole fraction i and Cpi = BTU

  • 8/10/2019 Dyflo Case Study Probelms

    9/24

    16 mole F

    Cpave = Cpave/mave

    h

    where Mave = yi Mi

    i

    MA = 70.90MB = 42.08MC = 76.53MD = 36.46ME = 112.98

    .. . Mave = 70.9 |1-X -X | + 42.08 |4-X -X |

    |5+X +X | |5+X +X |

    + (76.53 + 36.46 + 112.98) |X +X ||5+X +X |

    At any position z:

    C =8.6|1-X -X |+25.3|4-X -X |+(28.+7.2+30.7)|X +A ||5+X +X | |5+X +X | |5+X +Xa |

    H and H are essentially contant and not functions oftemperature. To=200 C=473 K . . Use H from Talbe 1 at 355 K.

    .. . - H =26700 cal (x 1.8) 48060 BTU

    gm mole 16 mole

    H =44000 cal (x1.8) 79200 BTUgm mole 16 mole

    r = 2.06 x 10 exp (-2700/RT) p p

    r = 11.7 exp (-6860/RT) p p

    p = 2(1-X -X ) P = 2(4-X -X )5+X +X 5+X +X

    . T |((-PH )(r ) + (-OH )) A -hi d(T-Tw)|dz. . | dT = | m c m c |

    |852

    The program, which utilizes some of the INT routinecontains explanatory comments. Conversion, XA and temperatue,

  • 8/10/2019 Dyflo Case Study Probelms

    10/24

    T, are determined as functions of reactor length, Z. Valuesof XA and T and Z are printed every 4 foot increments of zover a total length of reactor of 40 feet, as specified in thecall to PRNTF. When z=40., the program exits, jumping toSTOP, END. The printing routine does not provide labelling.Thus, FURTRAN WRITE and FORMAT statements are required toprint headings.

    Note that in the COMMON statement, dummy variables forZ,DZ and IO are substituted, namely P.Q and M. Fourth orderintegration with a fixed step size of .1 was used in thesolution. Calls to INT are made for each dependent variableintergrated.

    A program, CSMP1, utilizing the CSMP package, was alsowritten to solve the set of differential equations which modelthe system i problem #1. The INITIAL DYNAMIC and TERMINAL

    e theinitialization statements contained in the INITIAL sectionneed only be executed once.

    This CSMP program illustrates the use of the CONSTANT,RENAME, INTGRL, PRINT, TITLE, TIMER, and PREPARE statement.

    For example, T=INTGRL (852., TINT), integrates theexpression (integrand) TINT with respect to the independentvariable which has been renamed z (from TIME). At z=0.,T=852. which is the initial condition specified.

    The page heading as specified by the TITLE statement isprinted before the program output. The PRINT statementautomatically labels each variable. Since nine dependentvariables are printed, the format is equation form.

    The TIMER statement dictates that the independentvariable z, and corresponding values of the dependentvariables, will be printed every four feet as specified byPRDEL, until a final value of z=40. is reached, as indicatedby FINTIM. OUTDEL, the interval spacing for plot points, isset equal to PRDEL since it is not specified. The PREPAREstatement is included so that plots points, is set eqaul toPRDEL since it is not specified. The PREPARE statement isincluded so that plots may be obtained. The last three lines,END, STOP, ENOJOB signify the end of the program.

    The CSMP program has two advantages over the INT

    program. The variable step size integration provided by CSMPis more convenient. When using the INT routines, finding thebest integration interval may be a probelm and result in atrial and error search. If too small a step size is used, a'local time limit exceeded' message may appear during theprinting of the output when a CPU time limit was imposed andhas been exceeded. This means CPU time has been wasted, aswell as the user's time. A new integration interval must beselected and the program compiled and executed again. Thisproblem of selecting the proper step size is obviously

  • 8/10/2019 Dyflo Case Study Probelms

    11/24

    eliminated with the variable step size methods offered byCSMP.

    The CSMP PRINT statement is preferred over the INTsubroutine PRNTF. Labelling is provided and only thevariables specified are printed. Also, the TITLE statement isavailable. With the routine PRNTF, FORTRAN, WRITE and FORMATstatements must be included to supply headings for theoutput. Also, extra columns of meaningless zeros are printedif less than ten variables are specified for printing, in thecall.

    Problem #4

    A 2.5 cm I.D. and 30 cm long tubular reactor packed witha catalyst is to be used to oxidize prepane in a 1.0 mole %C H /air mixture. The reactor is surrounded by a coolingjacket containing a fluid at a constant temperature TS.

    Find temperature and fractional conversion as a functionof position along the reactor for the following conditions:

    Propane feed rate = .001 g mole/minFeed temperature = 650 KReactor pressure = 1 atm.

    (a) U = 0 (overall heat trancter coefficient)(b) U = .3 ca./cm -min- K)

    (i) Ts = 600 K(ii) Ts = 620 K

    (iii) Tx = 625 K(iv) Ts = 630 K

    Additional Information

    rate of reaction = - r H =12.8x10 exp(-21300/RT)C H

    gnolesC Hcm min.

    heat of reaction = (- Hr) = 530 kcval/gmole

    Heat capacity of gas = .27 cal/g K

    Solution

    Reaction: C H + 50 ------ 3CO + 4H O

    a + 5B ------- 3C + 40

    Component A = propaneB = oxygenC = carbon dioxideD = water

  • 8/10/2019 Dyflo Case Study Probelms

    12/24

    R = 1.987 cal/gmole KFao = .001 g moles/ minTo = 650 KP = 1 atmd = 2.5 cm- Hr = 5.3 x 10 cal/gmoleCp = .27 cal/s K

    Assume: plug flowconstant specific heatconstant heat of reactionconstant pressureconstant feed rateideal gasesuniform and constant cooling fluid temperatureuniform and constant overall heat transfercoefficient, H

    Mass balance for A over volume clement dV

    Input + Generation = Output + Accumulation

    Input = FA (gmoles/min)Output = Fa + DFa (gmoles/min)Generation = -C-r )dV (gnoles/min)Accumulation = 0

    .. . Fa - (-ra)dV = Fa + dFa

    dV = A x Dz

    Ax = Cross section area = d = (2.5) = 4.9/cm4 4

    Let X = Fractional conversion of AThen F = C (1 - X )

    and dF = - F dX

    .. . -(-ra)dV = -F dX

    dX = 2.8 x 10 exp (-21300/RT) (C A dz)

  • 8/10/2019 Dyflo Case Study Probelms

    13/24

    F

    C = p /R T where p = partial pressure of A

    For the reaction A + 5B ---- 3C + 4D

    at any portion z:

    moles A/time = F - F X = F (1-X )moles B/time = F - 5 F Xmoles C/time = F + 3 F Xmoles D/time = F + 4 F X

    F = F (1-X ) + F - 5F X + 3F X + 4F X + F

    where FJ = moles of nerts/time

    .. . F = F D + F X

    p = F P = F (1-X ) PF F +F X

    F = .001 gmoles/min.001 = .01 F (one mole % A)

    .. . F = .1 gmole/ min.

    C = P = F (1-X ) x PR T F +F X R T

    R = 82.05 cm - atm P = 1gmole K

    .. . dX = 2.8 x 10 exp(-21300/RT)|F (1-X ) | Ax dz

    |F + F X )R T| F

    X 30| | |F (1-X ) | A|dX =X =| 2.8x10 exp(-21300/R )| | dz| | |F +F X )R T | F0 0

    Energy Balance I + G =O + AAgain, A = 0

    .ising a 0 reference temperature I = m Cp T

    where m = mass flow rateof gas

    .0 = m Cp (T+dT) + UA (T-T )

  • 8/10/2019 Dyflo Case Study Probelms

    14/24

  • 8/10/2019 Dyflo Case Study Probelms

    15/24

    constructed for the solution of this problem. To handlemultiple runs, FORTRAN logic is required (i.e. If statements,flags and counters). In the program, J is the counter to keeptrack of which value of TS is to be used in the particularrun. J is also tested to determine program exit. N is a flagwhich is initially zero and is set to one to indicate a newcalling line for PRNTF. For the first run, U = 0 and theintegration interval, 0Z=.005. There is no heat transfer.For the other five different runs, DZ=.1 and U=.3; also TSvaries, having five different values (TS is an array). Thereis one call to PRNTF associated with U=0, and one with theother five runs.

    The CSMP program, CSMP2, also offers a solution toproblem #2.

    CSMP handles multiple runs very simply. This is thegreatest advantage of CSMP. One statement which facilitatesmultiple runs is the parameter (or ICON or CONSTANT)statement. One run is initiated using each volue of the

    parameter indicated. In this example, five runs are made, onefor each value of TS. The inital conditions are automaticallyreset as is the independent variable reset to zero. Theprogram makes five runs and then encounters the first ENDstatement. It is not followed by STOP, ENOTOB and soexecution is not terminated. Intermediate END statements alsosimplify the handling of multiply runs. The independent

    es in data or controlstatements, which follows this END statement. In thisexample U is change from .3 to zero, the parameter TS is setequal to a constant value of 650., and a new printing sequenceis incorporated by changing FINTIM and PRDEL in the TIMERstatement. Many intermediate END statements may be includedfor this purpose. In this program, the second END statementis followed by STOP, ENDTOB and execution is termined.

    Problem #5

    The reversible liquid phase reaction A+B C is to becarried out in two isothermal CSTR Continuous Stirred TankReactors) in series. Each reactor has a volume of 2000 cm .The temperature in both reactors is 25 C. The totalvolumetric feed rate is 4.5 cm /sec. and the density of thestream remains constant. The feed contains a large excess ofB, but no C. The two reactors are filled with a solutioncontaining a concentration of B equal to that in the feed, but

    no A is present. At time equal to zero the feed containing Aand B is started. Determine C /C , C /C , C /C asfunctions of time.

    The rate function is given by

    -r = A exp(-E /RT)(A-A exp (-E /R )C gmolecm sec

    where A = 2.26 x 10 (1/sec)

  • 8/10/2019 Dyflo Case Study Probelms

    16/24

  • 8/10/2019 Dyflo Case Study Probelms

    17/24

    C = C C = CC C

    For Reactor 1

    A mole balance for component A

    Input + Generation = Output + Accumulation

    Input = C q |gmol||sec |

    Generation = -(-m)(v) (gmole/sec)

    Output = C q (gmol/sec)

    Accumulation = dC V = V dC (assuming CSTR operatesdt dt completely full)

    .. . C q -(-ra)(v) C q + VdC

    dt

    but C = C C and dC = C dC

    . . . C q - (-r )(v) = C C + C V dC

    dtq - (-r )|v |= CA q + V dC

    |C | dt

    but

    -ra = 2.26x10 exp(-12070/RT) C -2.05x10 exp(-20100/RT)c

    and C = C C C = C C

    . . . q -(2.26x exp(-12070/RT)CA -2.05x10 exp(-20100/RT)C )V=

    C q+VdC

    dt

    dC =|q(1-C )-(2.26x10 exp(-12070/RT)C -2.05x10 exp(-20100/| V

    |RT)(C x )V|dt

    |

    Doing a mole balance for component c

  • 8/10/2019 Dyflo Case Study Probelms

    18/24

    C + (-r )(V) = C q + VdCdt

    C =0 C =C C dC =C dC

    . . . (-r )(V) = C C q + C V dC

    dt

    (-r )(V/C ) = C q + V dCdt

    . . . (2.26x10 exp(-12070/RT)(C -2.05x10 exp(-20100/RT)C )V

    = C q + V dC

    dt

    . . . dC =(2.26x10 exp(-12070/RT)C -2.05x10 exp(-20100/RT)V-

    VC q

    At t = 0 C = 0 since C = 0

    C

    For Reactor 2

    Doing a mole balance for component A

    I + G = ) + A

    I = C q

    G = -(-ra)(V)

    o = C q

    A = VdCdt

    .. . C q - (-R )(V) = C q + VdC /dt

    C C q - (-r )(V) = C C q + C V DC /dt C q - (-r )(V/C ) = C q + V dC /dt

    -r =2.26x106exp(-12070/RT)C -2.05x10 exp(-20100/RT)C

    -r =2.26x10 exp(-12070/RT)C C -2.05x10 exp(-20100/RT)

    C C

  • 8/10/2019 Dyflo Case Study Probelms

    19/24

  • 8/10/2019 Dyflo Case Study Probelms

    20/24

    pCp= 4.2x10 J/m CM = 100 kg/k moleC = 1 k mole/m

    The initial temperature to of the reaction mixture is20 C and the maximum allowable reaction temperature is 95 C.The reactor contain a spiral for heat exchange purposes; itssurface area A is 3.3 m and it can be operated with steam(T =120 C, U=1360 J/sec-m - C) and with cooling water(T =15 C, U=1180 W/m - C).

    Following the policy of operation:

    Preheat to 55 C, let the reaction proceed adiabaticallyand start cooling when 95 C or X =.9 is reached, then cooldown to 45 C.

    Find the time required for preheating, adiabaticoperatiion and cooling.

    Solution

    Batch Reactor

    V = mT = 20 C(- Hr) = 1.67x10 J/kgpCp = 4.2x10 J/m - CM = 100 kg/kmolC = 1 kmol/mA = 3.3 mT = 120 CXU = 1360 J/sec.m - CT = 15 CU = 1180 J/sec.m Ct = 600 sec.T = 900 sec.

    A------- P

    and -r =kC (kmol/m sec) and k=4x10 exp(-7900/T)(1/sec.)

    Assume: perfect mixingconstant volume (operates full)constant density, specific heat, heat of reaction

    constant and uniform T , T , V , UMole balance for component A

    Input + Generation = Output + Accumulation

    I = 0G = -(r )V=kC VO = 0A = dN /dt (moles/time)

  • 8/10/2019 Dyflo Case Study Probelms

    21/24

    .

    . . -(-r )(V) = dN /dt

    -kC = 1 dN but N = N (1-X ) where X = fractionalV dt conversion of A

    -kC = 1 d(N (1-X )) = -N dXv dt v dt

    but N = C for constant volumesV

    .. . kC = C dX

    dt

    C = N = N (1-X ) = C (1-X )V V

    .

    . . k(1-X ) = dX dt

    dX = k(1-X )dt

    Energy Balances - use a 0. ref. temp.

    (a) Preheat at 55 C.

    . . use steam

    I + G = O + A

    I = U A (T -T)

    G = (-r )(V)( Hr)(M ) = kC (1-X )( Hr)(V)(M )

    0 = 0

    A = d (pc VT) = pc V dtdt dt

    U A (T -T)+kC (1-X )( Hr)(V)M ) = pc V dtdt

    dT = U A (T -T)+kC (1-X )( Hr)(V) M )

    pc V(b) reacts adiabatically

    I + G = O + A

    I = 0

    G = (-r )(- Hr)(V)(M ) kmol x energy xvol = energyvol time kmole time

  • 8/10/2019 Dyflo Case Study Probelms

    22/24

  • 8/10/2019 Dyflo Case Study Probelms

    23/24

    in each section. However, this program structure refains thestage by stage development.

    A CSMP program, CSMP4, was also written to solve problem4, and illustrates the incorporation of FORTRAN logic andCONTINUE statements, as well as the use of the NOSORT, FINISH,RESET, and CONTINUE, CSMP statements. Since FORTRAN logic isused, that is to say IF and GO TO statements, the DYNAMICsegement is labelled NOSORT.

    Again, the program follow the 3 operational stages.Initially, N = 3 as defined in the INITIAL segment where N maybe called a flag. For this value of N, the preheat simulationis performed. The FINISH statement exits the program fromthis stage when T > 55 C. FINTIM is designated large enoughso that it is indeed the FINISH statement which causes exit,and not that TIME, the independent variable, = FINTIM the

    along with TIME), as specified by PRDEL. When T > 55 C, theprogram enters the TERMINAL segment which begins at statement3 ( a FORTRAN CONTINUE statement). All FORTRAN CONTINUE

    statements can be recognized by virtue of the fact that theyhave statement numbers. For the first run, the TITLEstatement given in the terminal segment, is printed,indicating that the system is being preheated.

    A CSMP CONTINUE statement is then encountered. TheCONTINUED statement is like the END statement, in that anotherrun is initiated, incorporating all changes in data andcontrol following the CONTINUE statement. They differhowever, in that with the CONTINUE statement, the independentvariable and initial conditions are not reset. The simulationcarries on from the point of interruption, retaining thevalues of TIME, XA and T. After the first CONTINUE statement,a new TITLE statement is included, thereby nullifying theprevous TITLE statement. The RESET statement is used tonulling the previous FINISH label. Then, new FINISHparameters are incorporated. The program will quit the secondrun when T > 95 C or XA > .9 as indicated by the new FINISHstatement. Furthermore, N is set equal to one so that whenthe program returns to the DYNAMIC segment for the second run,it will encounter the test on N, and go to statement 1. Thissecond run simulates the adiabatic reaction stage. At eachpass through the DYNAMIC segment, until the Finish conditionsare met, the program will jump to statement 1. Printingoccurs after each pass. When the FINISH conditions are met,the program exits the loop and encounters the second CONTINUEstatement. N is set equal to 2, a new TITLE statement is

    incorporated, and the RESET statement nullifies the previousFINISH statement. A new FINISH statement is added whichdictates that for run 3, the program wil exit when T > 45.Upon reentering the DYNAMIC segment, since N = 2, the programwill jump to statement 2 each time through this segment. Thecooling situation is simulated. When T reaches or exceeds45 C, the program encounters END, STOP, ENOTOB, andterminates. Throughout all 3 runs, the TIMER statement is notchanged, and hence the printing interval remains the same.FINTIM is large enough so that it is never reached throughout

  • 8/10/2019 Dyflo Case Study Probelms

    24/24

    the 3 runs.

    No new advantage of CSMP over INT, was apparent in termsof the simulation program. The mathematical model to besimulated, posed problems in that there were threedifferential equatons expressing temperature as a function oftime, depending upon whether the system was being preheated,reacted adiabatically, or cooled.

    However, the advantage of the variable step sizeintegreation method was again realized in solving thisproblem. Many values for the integration interval OTIM in theprogram BATCH, were tried before 5. seconds was determined asa workable value.