Top Banner

Click here to load reader

Polymath Tutorial for PCPII

Nov 07, 2015

ReportDownload

Documents

programa ingenieria

  • 1

    Polymath Tutorial Principles of Chemical Processes II

    Objectives: Be able to use POLYMATH to solve typical chemical engineering problems using the Differential Equation, Non-Linear Equation and the Linear Equations Solver.

    To be submitted as specified by the instructor using Blackboard. Submit in one word document per person. Save the word document using the following format: yournamePolymath.docx

    1. Answers to questions on page 2 2. 1 page from the NLE module of C&S 2.10a 3. 1 page from the LEQ module of C&S 2.4a 4. 1 page from the DEQ solver output with graph.

    1. Open polymath:

  • 2

    2. Go to Help, Contents F1 or Press F1

    3. Read the section titled Introduction to Polymath both getting started and Variables and expressions and answer the following questions typed into a word document to be submitted at the end of the tutorial:

    3.1. How many simultaneous ordinary differential equations can be simultaneously solved

    using the educational version of POLYMATH? 3.2. How many explicit equations can be solved using the POLYMATH ode solver? 3.3. What does NLE represent? 3.4. What symbol on the tool bar represents the polymath scientific constants menu? Give

    the value of pi to an accuracy of 12 digits using polymath scientific constants. 3.5. How would you have polymath give you the absolute value of a number? 3.6. Have polymath, using the calculator give you the cosine of 30 degrees. What did you

    type?

  • 3

    Cutlip&ShachamProblem2.10parta:BubblePointCalculationforanIdealBinaryMixtureinCutlipandShacham.This problem is in your Cutlip and Shacham text. In presenting this tutorial I have given you an example of how I would like computer oriented problems to be submitted for homework. Every problem starts with a hand written statement of the problem following the engineering homework format given in the syllabus. Note that sample calculations of major equations are given on this page.

    Place scan of 2 pages of handwritten notes

    HeskethPlaced Image

  • HeskethText Boxmm Hg

  • 5

    Figure1:Presstheshortcutfornonlinearequationsolver(NLE)

    Figure2:Usethetemplatesforeasyentryofequations

    Figure3:Theisthetemplatewiththeoverallequationentered.Notethisistheimplicitequation.(ThedefinitionofanimplicitequationisthatyoucannotsolvedirectlyforthevariableTbp.Inotherwordsyoucannotwrite:Tbp=f(allothervariables)AlsonotethatthedegreesymbolcanbetypedpressingandholdingtheAltkeyandthentypingthenumbersusingthenumerickeypad0176.OtherusefulsymbolsareformicrometerAlt+0181for.

  • 6

    Figure4:AfteryoupresstheDonebuttonthefollowingequationiswrittenintheprogram.NoticethatanerrorisgivenwiththeredX.Beforeyoucanfindthisyouwillneedtogiveanupperlimit.Noticethecommentsaregivenafterthecommentsymbolof#andareingreen.

    Figure5:Presstheshortcutbuttontohelpyouentertheexplicitsupportingequations.Ifyoupreferthesecouldbetypeddirectlyintothewindow.

  • 7

    Figure6:ExplicitEquationEntryScreen

    Figure7:minimumandmaximumvaluesofTbp.Youneedtouseyourjudgementofthephysicalsituationtopicktheselimits.

  • 8

    Figure8:Showlistofvariablesthatareneeded

    Figure9:Variablesinredneedtobedefinedbyanequation

    Figure10:Whatiswrongwiththisprogram?

  • 9

    Figure11EntertheProblemTitleandsaveyourwork

  • 10

    Figure12:Thefollowingscreenresults.Copythisintoaworddocumentsothatyoucansubmitpage

    Figure13:MakeagraphofthesolutionbyclickingontheboxnexttothewordGraph(seeredarrowabove)

  • 11

    Figure14:PolymathoutputsforNLEforasingleexplicitequation.Thegraphingoptionisnotavailableformorethanoneexplicitequation

    Figure15:Optionsforgraphs

    CopyandPasteGraph

    Selectwhatyouwouldliketograph

    Changefontsize,addtitletoxaxis.

  • 12

    Figure16:Themenutochangethesizeoftheplottedlineormarkers

    Figure17:ThismenuallowsyoutoaddatitlethatIhaveusedasanxaxistitle

  • 13

    Figure18:Allgraphsmusthavexaxisandyaxislabels.WhenusingPolymathyoumustmanuallyaddayaxislabel.

    ObjectiveFunctionf(Tbp)(mm Hg)

  • 14

    ObjectiveFunctionf(Tbp)(mmHg)

    Thispageplusthehandwrittenpagesshouldbeturnedinalongwiththehandcalculations.Noticethatiftheproblemrequestedananswerofabubblepointandmolefractionsthenthesemustbegivenbythestudentwithboxesaroundtheanswer.Itisbesttodothisbywritingtheansweronthehandcalculationpageorbytypingitonthispage.Forpartsb&cthenagreenengineeringpagemustfollowthisonewiththesetupof2.10partb.Thiswouldbepage3oftheassignmentor3/6.

    POLYMATH Report C&S 2.10a: Bubble Point Calculation for an Ideal Binary MixtureNonlinear Equation 12-Jan-2009Calculated values of NLE variables Variable Value f(x) Initial Guess

    1 Tbp 63.66452 1.722E-10 55. ( 10. < Tbp < 100. )

    Variable Value

    1 Pvapc5 1784.045

    2 Pvapc6 646.2172

    3 xc5 0.1

    4 xc6 0.9 Nonlinear equations 1 f(Tbp) = xc5*Pvapc5+xc6*Pvapc6-760 = 0

    T is in C and Pvap is in mm Hg

    Explicit equations 1 Pvapc6 = 10^(6.87776-1171.53/(Tbp+224.366))

    2 Pvapc5 = 10^(6.85221-1064.63/(Tbp+232))

    3 xc6 = 0.9

    4 xc5 = 0.1 General Settings Total number of equations 5 Number of implicit equations 1 Number of explicit equations 4 Elapsed time 0.0000 sec Solution method SAFENEWT Max iterations 150 Tolerance F 0.0000001 Tolerance X 0.0000001 Tolerance min 0.0000001 Data file:

  • 15

    ExampleoftheLinearEquationSolverbasedonCutlip&ShachamProblem2.4a:SteadyStateMaterialBalanceseonaSeparationTrainThis problem is in your Cutlip and Shacham text. In presenting this tutorial I have given you an example of how I would like computer oriented problems to be submitted for homework. Again, every problem starts with a hand written statement of the problem following the engineering homework format given in the syllabus.

  • 17

    Figure19:Fullyenteredproblem.MakesurethatthehandcalculationsshowtheoriginationoftheBcolumnnumbers.Alsoenteratitleandsavetheproblem

    Figure20:Problemtitlescreen

  • 18

    Figure21:Thisscreenappearsafterpressingthesolverbutton.Youshouldselectallandthencopythispageintoaworddocument,tobesubmittedwithyourhandwrittenwork.Rememberthatyoucantypeorwriteanswerstoproblemsonthesepages.

  • 19

    Thiswouldbepage3ofproblem2.4aorforthe2problemhomeworksetpage6/6

    POLYMATH Report Problem 2.10 Steady-State Material Balances on a Separation TrainLinear Equations 12-Jan-2009 Linear Equations Solution Variable Value

    1 x1 26.25

    2 x2 17.5

    3 x3 8.75

    4 x4 17.5

    The equations [1] 0.07x1 + 0.18x2 + 0.15x3 + 0.24x4 = 10.5 [2] 0.04x1 + 0.24x2 + 0.10x3 + 0.65x4 = 17.5 [3] 0.54x1 + 0.42x2 + 0.54x3 + .1x4 = 28 [4] 0.35x1 + 0.16x2 + 0.21x3 + .01x4 = 14 Coefficients matrix and beta vector x1 x2 x3 x4 beta

    1 0.07 0.18 0.15 0.24 10.5

    2 0.04 0.24 0.1 0.65 17.5

    3 0.54 0.42 0.54 0.1 28.

    4 0.35 0.16 0.21 0.01 14.

    General Number of equations: 4 Data file: e:\laptop\courses\principleschemprocii\lecture\c&s2.4a.pol

    A check of the answer would be that the sum of each of the 4 streams should equal 70 kmol/min:

    26.25 kmol/min +17.5 kmol/min +8.75 kmol/min +17.5 kmol/min = 70 kmol/min

    Remember that numbers always have units!

  • 20

    ExampleoftheDifferentialEquationSolverThis example is based on a batch reactor with 2 simultaneous chemical reactions. A component mole balance is constructed for chemical species. Since this is a batch reactor then the mole balances are differential equations. If this problem was an assigned homework problem then the first page of the problem would be a hand written setup of the problem. This page would contain:

    Setup of the component species mole balances including a diagram of the process (process flow diagram, pfd)

    Initial conditions Sample calculations showing the order of magnitude of the results.

    For example the mole balances for A, B and C are given by

    (1)

    (2)

    (3)

    The initial conditions in the batch reactor at t=0 min are A(0)=1 kmol/L, B(0)=0 kmol/L and C(0)=0 kmol/L. These are known as initial values. The integration will proceed from 0 min to t=3 min. The rate constants are k1=1 min-1 and k2=2 min-1.

    The following would be a sample calculation to show the order of magnitude of a change in the concentration of A with time. Using the initial conditions the initial change in A with time is:

    1 1 / 1 / min (4)

    An estimate of the value of after 1 minute would be (NOTICE that this is not a correct integration of the differential equation. This is ONLY an ESTIMATE and an assumption is made that the rate is constant. From this problem you will see that the rate starts at this initial value and then decreases with decreasing concentration of A.)

    /~ 1 / min

    1/ 1 / (5)

    The above result gives the final value the concentration of A to be zero. In other words if the reaction rate was at 1 kmol/(L min) for 1 minute, then there would be no reactant A left. It is

  • 21

    then up to the student doing the problem to evaluate if this reaction rate is what was specified or should the rate be 10 times lower.

    1. Start the Differential Equations Solver by selecting Program, DEQ Differential Equations and keep the help window open

    2. Choose the Differential Equations solver in the help menu

    3. Enter the 3 differential Equations and supporting explicit algebraic equations. To do this and

    learn about POLYMATH, I suggest that you read through the POLYMATH help file starting with the Overview section. After entering

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.