### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Introduction to Computer Calculations in Chemical Engineering CH E 111

NMSU

GPA 3.74

### View Full Document

## 49

## 0

## Popular in Course

## Popular in Chemical Engineering

This 0 page Class Notes was uploaded by Blanche Quitzon on Sunday November 1, 2015. The Class Notes belongs to CH E 111 at New Mexico State University taught by David Rockstraw in Fall. Since its upload, it has received 49 views. For similar materials see /class/233192/ch-e-111-new-mexico-state-university in Chemical Engineering at New Mexico State University.

## Reviews for Introduction to Computer Calculations in Chemical Engineering

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/01/15

NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2007 Exam 3 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or sup Iicate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules amp Directions 0 Open Bookamp Notes Save the file under the name ChE111X3XLS where should be your last name Email the file AS AN ATTACHMENT to drockstrnmsuedu Files will not be accepted after 230 PM Thursday 4122007 0 Sign this document and turn in before leaving the exam D A Rockslraw Ph D P E Problem 1 25 points Create an Excel worksheet that simulates throwing a pair of dice 20 times To do so enter the formula RANDBETWEEN1 6 in the first twenty rows of Column A and again in Column B Each value will be a random integer between 1 and 6 representing the outcome of one rando die Within each row of Column C place the sum ofthe corresponding values in Columns A and B In Column D use logical IF functions to place the following labels within each row a lfthe value in Column C is 7 or 11 display Win b lfthe value in Column C is 2 3 or 12 display Craps c lfthe value is anything else display Point NOTE RANDBETWEENab is an Excel library function that returns a random integer between the limits of a and b where b gt a To activate this function enable the Analysis Toolpack by selecting AddIns from the Tools menu D A Ruckslraw Ph D F E Problem 2 25 points 139 39 iwni given 39 temperature quot 39 L 335 410 and 675 C by tting a linear trend line to the data then applying the 39 how the equation ofthe trendline a 39 erforma o the eq tI ng Include r39 but showthem capacity at art num S squared value onthe chart Chan e v are in exponential notation format with ve decimal places showi ou 39 39 r quot L Placethe39 39 using a color and point than the experimental data given below Term c Heat Capacity kcaikg c i T c Heat Capacity kcaikg c u u was i u is mm EliiBE i am mm 2m n 1282 i BEIEI n 1737 sun n 1396 i 7m u iEEIE Elia D a u 53 g u g n 3 g D g u U y 1 EIBEBSEEIAXH DEZZSEVEH R2997E31E7Ui u M u in Temperature to m in g f b u numnaaaa u 15225 CF F537 E4H13FME maramma maraawma maramma D A Pockstnaw Ph D P E Problem 3 25 points Chemical quot 39 39 uid through a series of pipes To do so requires the determination ofa friction factor Ifthe uid flow is turbulent and the pipes are smooth the 39iction factor can be determined 39om 11513 RuF 1n f 251 where represents the 39iction factor a positive value that does not exceed 01 Re represents the Re nolds Number which is a function ofthe uid properties pipe diameter and nominal uid velocity The Reynolds Number increases with increasing uid velocity The ow becomes n l L euuuue when 000 Hence only valid when Re exceeds 3000 Determine values ofthe friction factor corresponding to Re 5000 12000 and 20000 Solution 39 39 39 39 quot 39 with a zero on the right side of the equal In the ame on the left the rst two values have already been found using Goal Seekquot and the value offat Re 20000 is about to be sought In the ame on the right Goal Seekquot has found the value that converges the solution l um 5mm 0037393 3 SEEDB 12mm nuzauz 422315 20000 IDZEEE3 57mm 1 snnn drama 0 A Rockstraw PhD P E Problem 4 25 points The formula for calculating the surface area A of a right cylinder is A 2m2 anh where r is 39 39 L 39 lhe cylinder quot plol A vs rfor cylinders of heights 37and 11 cm F quot h 39 39 39 4 MUD 12m i h7crn mun Sun A cmz sun ADD 2mm rcm D A Pocksiraw Ph D P E NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2007 Exam 4 100 points Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or su licate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Bookamp Notes 0 Attach Mathcad files generated in preparing your solution to the exam to an email 0 Email the files containing your solutions to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after class Sign this document and leave with the exam proctor before leaving the exam room D A Rockslraw Ph D P E Problem 1 25 points Use Mathcad to determine the time it would take a baseball to hit the ground if it is thrown straight down from the top of the Empire State Building at a velocity of 100 miles per hour How does this compare to the time required if a car is dropped from the same height with no initial velocity Newton s laws of motion provides the relationship d V0t gt2 where d is the distance traveled v0 is the initial velocity in the ydirection g is the gravitational constant 322 ftsz andt is the time of travel You may have to use internet resources to find any missing information in this problem statement SOLUTION 100 mi 1 2 dvtt ojhr 0 2g il 2 d1250ft VO t gGENO 2V02 2gd 5365 t 5 8815 Problem 2 25 points As learned in Exam 2 the law of cosines is used to calculate the length of the side opposite of an angle given the measure ofthat angle and the two adjacent sides The law of sines can then be used to determine the measures of the other angles Write MathCad function called triangleabC that is calculates and returns the length of the hypotenuse c A function that uses a program to also calculate the size of angles A and B in degrees will receive 15 points extra credit Law of Cosines c2 a2 b2 7 2ab x cosC Law of Sines smA smB smC SOLUTION tIiangleabC c e la2 b2 7 2abcosC c A triangle 343 0 2834 4 J A 0846 B151 DA Rockstraw PhD PE Problem 3 25 points y Iog 5xli Liul a b Use 1mm MNCUOH may be unde ned at some va ue Ofgtlt SOLUTION mawma ungt s zh m agsti L xza Mmrmzefx z 76 854 x z 1 Mmrmzefx z 1832 x5 anzefx z 5 x 1n ma xjxr 171 7112111 Mmefx 11854 mamxxn11 1122 mamxx145 4374 mamxx45s 565 Problem425 points is x3y6x327xzy727xz721xy21x7 18y 18 SOLUTION 763316x327xzy727x2721xy21x718y 18 1 3x2x732x1y71 76x327x2721x71gy6x3727xz21x18 1H 76 y 6 x3 27y 7 27 x2 721 y 21 x7 18y 18 D A Pockstnaw Ph D P E NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2006 Exam 1 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or su licate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Bookamp Notes 0 Cut and Paste functions and script files you are requested to prepare as well as sessions from the command window in Matlab7 that demonstrate the operation of a program you have prepared to a Microsoft Word file Save the file under the name ChE111X1doc where should be your last name Delete the blank carriage returns from a command window session to reduce the size of the file un37 0 Email the file containing your solution to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after class 0 Sign this document and leave with the exam proctor before leaving the exam room D A Rockslraw Ph D P E Problem 1 20 points a Write a function that performs an ideal gas calculation where the function is called as follows IdealGas PV T R and returns the value of n the number of moles b Apply the function in the command window to calculate the number of moles that exist in a volume of 224 L at a pressure of 1 atm and at a temperature of 273 K See probems 111 and 112 in the text if you forgot the Ideal Gas Law or the value of R function n IdealGasPVTR n PVRT gtgt IdealGasl2242730082 ans 10006 Problem 2 20 points a Write a script file IGimainmthat performs the ideal gas calculation to determine number of moles The script should ask the user for each of the other four quantities The script file should use the function from Problem 1 to perform the calculation after input ofthe arguments b Execute the script in the command window for the same conditions specified in Problem 1 lhis script calls the function IdealGasPVTR to calculate the number of moles of gas R input39Enter the universal gas constant 39 P input39Enter the gas pressure 39 T input39Enter the gas temperature 39 V input39Enter the gas volume 39 n IdealGasPVTR disp39Moles of ideal gas 39 dispn Problem 3 20 points 4 2 a Define y 2x 3x x 7 as afunction named f3m b Plot the function across the range 2 g X g 2 c Use builtin functions to identify the zeros and the minima in the plotted range of X function y f3x y 2XA4 3x22 x 7 7 4 000l2 gtgt y 3x gtgt plotxy gtgt x 2 f gtgt fzero39f339 05 ans l 231 gtgt fzero39f339l 5 ans 5989 0 7 gtgt fminbnd39f339 l5 O5 ans 09397 gtgt fminbnd39f33905l5 5 7 ans 07661 DA Rockstraw PhD PE Problem 4 5 points Find the product ofthe polynomials fA x3 2x1 and fB x2 3 using conv 5113 and assign the resulting vector of coefficients to the variable C gtgt A1 O 2 1 gtgt B1 O 3 gtgt C conVAB C 1 O l l 6 3 Therefore the resulting polynomial is fC 1x5 0x4 1x3 lx2 6x1 3 Problem 5 15 points a efine matrix A below in the command window of Matlab7 b Using builtin functions operating on A i define matrix B as a submatrix of Athat does not include elements ofthe first row or first column ofA ii define C as a submatrix ofA that does not include the fourth row or the fourth column ofA iii define the vector D as the first row of A c Perform the following operations i matrix multiplication D x A ii elementbyelement addition B C iii sum ofthe element Afound in the second row and the fourth column and the first element of D 14 10 2 205 20013 7 3 4 1 gtgt BA2424 B 2 O 5 O l 3 3 4 1 gtgt CAl3l3 C 1 4 l 2 2 O O O 1 gtgt DA1 D 4 l 0 gtgt DA ns 9 4 2 17 gtgt BC ans 1 4 4 2 l 3 3 4 2 gtgt A24Dl ans 6 DA Rockstraw PhD PE Problem 6 20 points Write a script file using a for loop to calculate the tenelement summation given below The variable x should be the argument to the function such that the function call is performed as foritest 10 1 k Execute the function at the command window forx 2 function k foritestm sum O for illO sumsumlXAi end k sum gtgt kfor7test 2 k 09990 Extra Credit 20 points Modify the script file in Problem 2 such that the program first asks the user which quantity is to be calculated P V n or T The program should then request the appropriate input to perform that calculation The main program should use if els and then statements to filter through the appropriate calculation sequence with each ofthe four different subfunctions called as appropriate di5p39Enter the number of the term you Wish to calculate39 dlSp39lP27V3NF4T select 1 or 439 Rinput39Enter Value of gas constant you wish to use39 disp39be sure to enter the following in units consistent with R39 39volume 39 Tinput 39temperature 39F 39 Tinput 39temperature 39 Ninput 39moles 39 Pinput 39pressure 39 y39 cNRT P disp 39Volume is39 elseif s y39 Pinput 39pressure 39 y39 Vinput 39Volume 39 Tinput 39 temperature 39 CPV RTr39 39number of moles of gas is39 elseif s y Pinput39pressure in atm 39 y39 Ninput 39moles 39F V nput 39Volume in liters 39 cPV NRr39 disp 39 temperature is39 39follow the directions39 gtgt xcredit Ideal Gas Calculator Enter the number of the term you wish to calculate P 4T select 123 or4 Enter Value of gas constant you wish to use0082 00820 be sure to enter the follOWing in units consistent With R pressure volume 224 temperature 273 number of moles of gas is 10006 DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2006 Exam 2 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or su licate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules amp Directions Open Book amp Notes Save the script file under the name ChE111X2m where should be your last name Email the file to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after 225 PM Thursday 3302006 Sign this document and staple it to a hardcopy of your script file Deliver it to my box in JH 259 with by the due datetime 0 NOTE This exam is to be solved independently and may not be discussed with other persons Collaboration will result in a 0 assigned for this exam D A Rockslraw Ph D P E Problem 1 100 points Write a Matlab7 script file that accomplishes the following objectives 1 U The program input section should prompt the userto select one of four program functions requiring the user enter either F S C or P as defined F function S term summation C combination P permutation The program should insist the user provide one of these four inputs or exit the program and should indicate when an error in input is made and repeat the request This section should use character input rather than numerical input Ifthe user selects the input section of this portion of the program should request the user provide a function in a string format The program input should also request the beginning and end values ofthe range variable X for which the function should be plotted The program output should include a plot ofthe function with labels for the X and y axes and a title on the plot that reads fX where the blank contains the function string provided by the user Ifthe user selects the input section ofthis part of the program requests the user input a function in the form of a string and the number of terms n to be summed as yfx The program should then indicate the sum ofthe first gterms ofthe function fX y is sum where the underlined items are replaced with the user inputs or calculated quantities as appropriate The program should plot two results on the same graph each term in the series vs X with a red line and a red circle for each point cumulative sum vs X with a blue line and a black fivepointed star for each point Ifthe user selects P for permutation calculation the input section should request how many items the user wishes to apply to a permutation calculation n and the number of items taken at a time k The program should then calculate the number of possible permutations using n P n kl Note that there is a builtin function that calculates factorials If you are unfamiliar with a factorial it is the product of all integer terms including and less than the value n nl nn 1n 2n 321 7l7gtlt6gtlt5gtlt4gtlt3gtlt2gtlt1 The output section of the program should then indicate items taken k at a time can be permutated in E different ways where the underlined items are replaced with the user inputs or calculated quantities as appropriate Finally if the user selects C for combination calculation the input section of the program should request how many items the user wishes to apply to a combination calculation n and how many are taken at a time k The program should then calculate the number of possible combinations 7 C n km The output section of the program should then indicate items taken k at a time can be combined in E different ways where the underlined items are replaced with the user inputs or calculated quantities as appropriate DA Rockstraw PhD PE while q disp39Enter which program feature do you WlSh to use39 disp39 F function39 disp39 S term summation39 disp39 C combination39 di 39 P permutation39 o 39 if s lectii39F39 select39C39 selec 39S39 selec 39P39 uit y39 continue else disp39Try again Note selection must be in upper case39 d15p39 39 end end if select F input39enter the function of x you W15 to plot as a string 3939 Xmininput 39enter the minimum x value 39 Xmaxinput 39enter the maximum x value 39 fplotF Xminxmax ninput39enter the number of terms in the summation 39 yinput39enter the function of X to be summed as a string 39 sum 0 termcount eval Y sum sum ermcount sumtcountsum end d15p39 39 c2num2strn csumnum2strsum 39 disp39sum of the first 39c239 terms of the function fx 39 is 39csum Xln plotxterm39r39xterm39ro39 hold plotxsumt 39b39xsumt 39kp39 Xlabel 39X39 ylabel 39term evaluation and cumulative sum39 title 39evaluation of the series 39y legend 39 39 39term39 39 39 39sum39 old elseif select ninput39how many items in the permutation 39 kinput39how many are taken at a time 39 de k perm factorial n factorial den cpermnum2strperm n W H 3 I E m m n rs k spcn39 items taken 39ck39 at a time can be permuted in 39cperm39 Cy different ways39 elseif select 39 ninput 39how many items in the combination 39 kinput39how many are taken at a time 39 den 7k combfactorial n factorial den factorial k cknum2 str k dispcn39 items taken 39ck39 at a time can be combined in 39ccomb39 different ways39 end DA Rockstraw PhD PE Session 1 Run your program Select F Use the following function f x x 2l Plot over the interval for x of 3 3 Enter which program feature do you wish to use gtgt exam2 E function S term summation C combination P permutation enter the function of x you wish to plot as a string 39 2139 enter the minimum x Value 73 enter the maximum x Value 3 Session 2 Run your program Select S Use the following function f 2 exp ixn abs cos 2112pi Specify ten terms for the summation gtgt exam2 Enter which program feature do you wish to use 7 function S term summation C combination P permutation Enter E S C or P S enter the number of terms in the summation 10 enter the function of x 39exp7xnabscosxnt2tpi to be summed as a string sum of the first 10 terms of the function fxexp7 xnabscosxn2pi Current plot held Current plot released is 122102 term evaluation and cumulative sum main evalualiun uflhE series exppxnabssusxn 2 pi Session 3 Run your program Select P Specify a permutation of 10 items taken 4 at a time gtgt exam2 Enter which program feature do you wish to use E function S term summation C combination P permutation Enter E S C or P P how many items in the permutation 10 how many are taken at a time 10 items taken 4 at a time can be permuted in 5040 different ways Session 4 Run your program Select C Specify a combination of 10 items taken 4 at a time m2 gtgt exa Enter which program feature do you wish to use E function S term summation C combination P permutation Enter E S C or P C how many items in the how many are taken at 10 items taken DA Rockstraw PhD PE 4 at a time ca combination a time n be combined in 210 different ways 10 NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Fall 2007 Exam 1 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or su licate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Bookamp Notes 0 Cut and Paste functions that you are requested to prepare as well as sessions from the command window in Matlab that demonstrate the operation of a program you have prepared to a Microsoft Word file Save the file under the name ChE111X1doc where should be your last name Delete the blank carriage returns from a command window session to reduce the size of the file gt z fun37 Del this line Z Delete this line 303 Delete this line gtgt 0 Email the file containing your solution to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after class 0 Sign this document and leave with the exam proctor before leaving the exam room D A Rockslraw Ph D P E Problem 1 25 points The quadratic equation provides the roots to the polynomial ax2 bx c 0 according to 7 7 b r dbl 7 4210 7 221 Write a function called qe a b c that solves the quadratic equation and returns solutions Use your function to solve for the roots of the equation x2 lt 91 0 function xl x2 qeabc xl b sqrtbA2 4ac2a x2 b sqrtbA2 4ac2a gtgt xlx2qel6 9l xl 7 X2 l3 Problem 2 25 points Write a program called grade m that calculates grades according to the following directions 1 Ask student for their scores on five exams and one total homework score 2 Calculate the student s average score assuming that each of five scores are of equal value 3 Use logical statements to return the student s letter grade assuming the scale A 90 to 100 B 80to 89 C 70to 79 D 60to 69 F gt 60 Huge extra credit will be awarded if the code makes sure that the inputs are between zero and 100 and alerts the user to try again should a value out of this range be entered function grade grades for i l kO while k if i 6 fprintf39exam llin39i ei input39score 39 else eiinput39homework score 39 end if ei lt0 i ei gt100 disp39input out of range must be 0 to 10039 else kl end end end avg sume6 disp39grade if avg gt 895 disp39A39 elseif avg gt 795 disp39BW elseif avg gt 695 disp39C39 elseif avg gt 595 disp39D39 else disp39F39 DA Rockstraw PhD PE Problem 3 20 points a Define y xl4 cos2Xsin as a function named f2 m b Plot the function across the range 0 g x g 211 In the plot command include the statement axis xmin xmax ymin ymax to set the xaxis range exactly to that noted Label the axes x and Add the line yO to the plot to allow easy visual identification of the zeros c Use builtin functions to identify interesting mathematical features observed in the plot function y f2x yxAO25cos2xsin05x gtgt xO0012pi gtgt yf2x gtgt p10txyxlabe139x39y1abe139y39 gtgt p10txyAXISO 2pi 15 15x1abe139x39y1abe139y39 gtgt hol Current plot held gtgt plot x O Two local minima found as 4 gtgt fminbnd 39 f239 1 2 ans 17119 4 gtgt fminbnd39f23945 x ans 46140 Three local maxima found by changing to y 7x 4 cos2xsin then use fminbnd gtgt fminbnd 39 f239 2 4 3 1602 ans gtgt fminbnd39f23901 ans 04631 gtgt fminbnd39f23952pi ans 58583 Six zeros found using fzero function gtgt fzero39f239003 V V W H N ero39f239051 07854 V V W HN ero39f23923 23562 ero39f2393542 39270 V V W H N V V W H N ero39f23956 549 V V W HN ero39f23962pi 62832 DA Rockstraw PhD PE Problem 4 10 points Find the product multiplication not cross product fA xfB of the polynomials defined as fA 74X6 7X2 3X78 fB x27x477x71 Using the function convab and assign the resulting vector of coefficients to the variable C then find the roots of all three functions some answers will contain imaginary numbers gtgt A 4000 13 8 gtgt B101 71 gtgt CconvAB C 7 4 0 4 28 5 3 9 10 30 59 8 gtgt The resulting polynomial is fC 74x10 7 4x8 28x7 7 5x6 3x5 7 94 103 7302 59x 7 8 gtgt rootsA ans 10130 064791 10130 064791 00818 110131 00818 110131 09311 051691 09311 051691 gtgt rootsB ns 09121 180291 09121 180291 16781 01460 gtgt rootsC ans 09121 180291 09121 180291 10130 064791 10130 064791 16781 00818 110131 00818 110131 09311 051691 09311 051691 01460 Problem 5 20 points a Define matrices W and Q below in the command window of Matlab7 b Using builtin functions operating on W Q or one of the subsequently defined matrices i define R as a submatrix of Q that does not include the first row or first column of Q ii define D as a submatrix ofw that does not include the last column iii define E as the first row of R c Perform these elementbyelement operations on one line in the command window i Define M as the product of W and R ii Define A and the product of Q and the transpose of Q iii Define G as the matrix created by taking the transpose D as the first row and the transpose of E as the second row then multiplying that result by matrix M 1 0 2 W1 0 Q 1 0 0 72 1 0 72 a gtgt W100 2 gtgt Q 1 O 2O 1 O1 O 2 101 gtgt Q2323 1011 gtgt DW1 10111 gtgt ER1 c1 gtgt MWR C11 gtgt AQQ39 0111 gtgt GD39 E39 M DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E 111 Chemical Engineering Calculations UNlVERSlTY Matlab Exam Fall 2008 Full Name please print SOLUTION NMSU Student ID Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive provide or supplicate assistance from anyone during the course of this examination Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished to the maximum extent allowable described under quotAcademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by the exam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Book 0 Cut and Paste functions that you are requested to prepare as well as sessions from the command window in Matlab that demonstrate the operation ofa program you have prepared to a Microsoft Word le Save the le underthe name ChE111X1doc where should be your last name 0 Email the file containing your solution to drockstrnmsuedu Also attach your script m files for problems 2 4 Assure you have delivered it to the correct address files will not be accepted after class 0 Sign this document and leave with the exam proctor before leaving the exam room Ch E 111 Fall 2008 Matab Exam 1 Problem 1 25 points Create a graph of the two functions on a single plot across an xrange of O to 21 yl x max black solid line y2 x 2cos2x blue dashed line Label the axes x and y and title the graph Plot of fxsinx and it s derivativequot Include a legend that distinguishes the two lines The number of points that are used to create the lines should be sufficient to assure the curves are smooth gtgt gtgt gtgt gtgt gtgt gtgt gtgt XOpilOO2pi ylsin2x y22cos2x plOtlell 39kll le2l 39b39 title39Plot of fxsin2x and its derivative39 xlabel39x39ylabel39y39legend39y39 39dydx39 grid on Plot of fxsin2x and its derivative Ch E 111 Fall 2008 Matab Exam 2 Problem 2 25 points Consider the quadratic equation ax2 bx c 0 The solution to this equation is bivb2 4ac x 2a The term b2 4acquot is called the discriminate of the equation The nature of the discriminate determines the number and type of the roots as follows discriminate value number and type of roots positive 2 distinct real roots negative 2 complex roots zero 1 repeated root Write a program to solve forthe roots of a quadratic equation The program should 1 read the input values of a b and c 2 calculate the roots and 3 output the results including a statement about the type of the roots ie There are 2 distinct real rootsquot Demonstrate the use of the program for the following equations x2x10 2x2x20 x22x10 disp39This program solves for the roots of a quadratic39 disp39 equation of the form axAZ bx c O39 prompt for input of coefficients ainput39input the value of the coefficient quotaquot 39 binput39input the value of the coefficient quotbquot 39 cinput39input the value of the coefficient quotcquot 39 calculate and announce discriminate discriminate bAZ 4ac fprintf39the discriminate is fn39 discriminate calculate and announce roots if discriminate gt O xl bsqrtdiscriminate2a x2 b sqrtdiscriminate2a disp39the equation has two real rootsW fprintf39xl f n39 xl fprintf39x2 f n39 x2 elseif discriminate O xl b2a disp39the equation one repeated root39 fprintf39xl x2 fn39 xl else realipartb2a imagipartsqrtabsdiscriminate2a disp39the equation has two imaginary roots39 fprintf39xl f i fn39 realipart imagipart fprintf39xl f i fn39 realipart imagipart Ch E 111 Fall 2008 Matab Exam 3 gtgt quadratic This program solves for the roots of a quadratic equation of the form ax 2 bx c input the value of the coefficient quotaquot 1 input the value of the coefficient quotbquot 1 input the value of the coefficient quotcquot l the discriminate is 3000000 the equation has two imaginary roots x1 0500000 i 0866025 x1 0500000 i 0866025 gtgt quadratic This program solves for the roots of a quadratic equation of the form axA2 x c 0 input the value of the coefficient quotaquot 2 input the value of the coefficient quotbquot 1 input the value of the coefficient quotcquot 2 the discriminate is l7000000 the equation has two real roots x1 0780776 x2 1280776 gtgt quadratic This program solves for the roots of a quadratic equation of the form axA2 bx c 0 H input the value of the coefficient quotaquot input the value of the coefficient quotbquot 2 input the value of the coefficient quotcquot l the discriminate is 0000000 the equation one repeated root x1 x2 l000000 Ch E 111 Fall 2008 Matab Exam Problem 3 25 points Given the vector 5 17 3 8 O 1 12 15 20 6 6 4 7 16 write a script file that doubles the elements that are positive and divisible by 3 andor 5 and raise to the power of 3 the elements that are negative but greater than 5 Use the builtin function rem A B that calculates the remainder when A is divided by B Your logical statements will be a bit complicated since multiple conditions must be met Use a looping operation to complete this task v 5 17 3 8 0 1 12 15 20 6 6 4 7 16 n1ength V if Vkgt0 amp remVk3 i remVk5 Vk2Vk elseif Vklt0 amp Vkgt 5 Vkk 3 gtgtprob1em3 V1O 17 27 8 O 1 24 3O 4O 6 12 4 7 16 Ch E 111 Fall 2008 Matab Exam 5 Problem 4 25 points The function fx 9quot can be represented by a Taylor series by the expression Tl ex x n n0 Write a script file that estimates eX by using this series The program should calculate eX by adding terms of the series stopping when the absolute value of the term last added is lt 00001 The code should report both the value of expx as well as the number of terms used in the summation If after 3Oth terms the value last added is not lt 00001 the calculations should stop and display the message more than 30 terms are requiredquot Use the program to evaluate e2 equot and e21 Xinput39enter X 39 n1 an1 San While absan gt 00001 amp n lt 30 anXAnfactoria1n SSan nn1 end if ngt30 disp39more than 30 terms are required39 else fprintf39eXpf f39XS fprintf39nThe number of terms used is in39n end gtgt eXpOX enter X 2 eXp2000000 7389046 The number of terms used is 12gtgt eXpOX enter X expn The number of terms used is 2 gtgt gtgt eXpOX enter X 2 eXp2000000 7389046 The number of terms used is 12 gtgt eXpOX enter X 4 eXp 4000000 0018307 The number of terms used is 18 gtgt eXpOX enter X 21 more than 30 terms are required Ch E 111 Fall 2008 Matab Exam 6 NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Fall 2006 Exam 3 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or sup Iicate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules amp Directions 0 Open Bookamp Notes Save the file under the name ChE111X3XLS where should be your last name Email the file AS AN ATTACHMENT to drockstrnmsuedu Files will not be accepted after 105 PM Thursday 11I092006 0 Sign this document and turn in before leaving the exam D A Rockslraw Ph D P E Problem 1 35 points An alternative NFL Quarterback rating system has been E705 proposed that puts more emphasis on long passes and QBRa g A01 AT 0 025 W touchdowns and a larger penalty for throwing 39 39 39 interceptions This calculation is as shown where C 2 completed passes A E attempted passes T 2 touchdown passes and l E intercepted passes Different to this proposed rating system compared to that studied in lecture a the four terms in the summation are limited to a maximum value of 24 but there is no lower limit and individual terms may be negative and b quarterbacks must play in at least half of the sixteen games in the season to be ranked Prepare a spreadsheet to rank the quarterbacks in the NFL based on their 20052006 seasons stats data available on the course website under Resources Use logical statements to restrict the values of the terms in the summation and to set the QB Rating value to zero if the quarterback has not played in nough games to be eligible forthe ranking system Sort the statistics by the calculated QB rating and hide intermediate calculation columns Create a bar chart containing the top ten quarterback ratings 20052006 Alternate QB Rating Stats Peyton Manning QB Rating Jake Delhomme DA Rockstraw PhD PE Problem 2 40 points Insert a second worksheet into your file for Problem 2 and name it Problem 2 The radioactive decay of unstable elements follows the exponential mathematical model NtN0 e where Nt represents the number of isotopes remaining at time t and No represents the original number of isotopes in the sample at t 0 r is the decay constant and is unique to each species The data below represents decay data for the transition metals seaborgium and meitnerium and the poor metal ununtrium These metals have halflives of l hour 30 minutes and 20 minutes respectively where the halflife of an unstable metal is the time required for NtN0 to reach a value of 2 a Plot the data using an Xy scatter plot Make each data set a different color b Fit an appropriate trend line to each set of data and identify the value of the decay constant I for each data set Color the trendline to match the color ofthe data point set it represents Include both the trendline equation and the R2 value on the plot c Include a legend to identify which data set represents the named metals t min WM 1 WM 2 WM 3 tmin WM 1 WM 2 WM 3 071 0 0 50 016 030 20 047 080 061 60 014 048 022 30 038 070 048 70 008 043 018 40 024 060 040 80 005 037 016 1 I y 10086e39 39 126quot 09 7 R2 0995 y 029951e390390239quot 08 7 R 09951 07 y 10315e39 364 o5 R2 09921 D 2 05 7 2 04 7 0393 O ununtrium 0392 7 l seaborgium 01 Ameitnerium 0 r r r r r r r r O 1 O 20 3O 4O 5O 60 7O 80 time min DA Rockstraw PhD PE Problem 3 25 points Insert a third worksheet into your le for Problem 3 Name it Problem 3 The Wagner equation is one of the best mathematical models to express the reduced vapor pressure Prsa as a function of reduced temperature T ATBT15 C39r3 DT6 lnPrsat 171 where E is defined as 1 T A B C and D are constants unique to a particular gas In a report entitled High temperature high pressure thermodynamic measurements for coal model compounds by Vinayak N Kabadi of NO State University Wagner constants for modeling tetrainquinoline data are given as A 698143 B 000178 C 1 48936 D 473306 Use goal seek in Excel to establish the reduced temperature for reduced pressure of076 When goal seek has converged your solution hold the ALT key then press the PRINT SCREEN button This will place an image of the screen on your clipboard that shows the convergence window Paste this image into your spreadsheet to demonstrate you used goal seek to achieve the result P 5339 0054453216i A 698143l B 00017808l c 148936i D 473306i 1 05i T 05i l Psat 076 P5 07597 A 698143 B 000178 0 1 48936 D 473306 1 00461 Tr 09539 Pf iEXPBZBG B3B6quot 5 B4B6quot3 BSB6quot61BG A i698143 B i00017808 c l148936 D 4 73306 E Tr 0 953896587387325 DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Fall 2006 Exam 1 Full Name please print Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or su Iicate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Bookamp Notes 0 Cut and Paste functions that you are requested to prepare as well as sessions from the command window in Matlab that demonstrate the operation of a program you have prepared to a Microsoft Word file Save the file under the name ChE111X1doc where should be your last name Delete the blank carriage returns from a command window session to reduce the size of the file gtgt 2 fun37 Delete this line Z i Delete this line 303 Delete this line gtgt 0 Email the file containing your solution to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after class 0 Sign this document and leave with the exam proctor before leaving the exam room D A Rockslraw Ph D P E Problem 1 25 points Write the function pythagorean ab which takes two arguments that represent the length ofthe legs of a right triangle a and b and returns the length ofthe hypotenuse c and the smallest angle measurement in degrees Yourfunction should use a logical statement to determine how to calculate the angle and should accept vector inputs Apply the function in the command window to calculate hypotenuse length and angle of triangles having legs of 7 2 and 3 centimeters and 11 and 10 centimeters function 0 theta pythagoreanab for kllengtha Ck sqrtakA2bkA2 if ak gt bk dk atanbkak else atanakbk end thetak dk lBOpi end Problem 2 25 points Develop a function called sumthat takes no input inputs informs the user that this program will sum the integers from 1 to n please input an integer nfthensumsaHof the integers to and including n using a for loop If n is a noninteger the function should ask the user to reenter another value that is an integer This check is easiest to accomplish using a while loop Using the following procedure use the function round n to truncate any decimal the user may have included with their input then subtract that result from n lfthe difference is anything but zero the user must have input something other than an integer and the while loop is not exited In this format your input statement that accepts the value of n should be located immediately following the while statement When the difference is exactly zero reset the while counter to zero so the loop is exited Demonstrate operation of your code with an input of 38 Problem 3 20 points a Define y 2X4 e36pr as a function named polynm b Plot the function across the range 8 g x g 8 Label the axes appropriately as x and c Use builtin functions to identify the zeros and the local minima and maxima in the plotted range Problem 4 10 points Find fAfB ofthe polynomials fA 4x7 7 2X5 4x4 73x3 2x2 X71 and fB X3 ex 1using the function deconv ab and assign the resulting vector of coefficients to the variable C Problem 5 20 points a Define matrices A and B below in the command window of Matlab7 b Using builtin functions operating on A or B i define C as a submatrix ofA that does not include the first row or first column of A ii define D as a submatrix of B that does not include the 4th column nor the 3rd row of B iii define the vector E as the first column of A c Perform the following operations if possible i Multiply vector E by 3 ii matrix multiplication C X D iii elementbyelement addition ofA and the transpose of B ie B39 DA Rockstraw PhD PE iv elementbyelement multiplication of A and B v matrix multiplication of A an vi sum of element in 2quotd row 3 column of A and element in 2quotd column 1 row of D 104 2104 0172 A B07230 713 10710 20 DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2006 Exam 4 Full Name please print Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or sup Iicate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules amp Directions 0 Open Bookamp Notes Save the file under the name ChE111X4xmcd where should be your last name Email the file AS AN ATTACHMENT to drockstrnmsuedu Files will not be accepted after 230 PM Thursday 542006 0 Sign this document and turn in before leaving the exam D A Rockslraw Ph D P E Problem 1 25 points Use symbolic processing to factor the expression 8x4 32x3 170x2 8x 42 78X4 32X3 170x2 7 8X7 42 factor 7 722X 12X71X7 7X 3 Collect the expression 7yx3 3xy3 10x2 7yx 42y x5y3 x2y2 in terms of y 7yX3 3xy3 10X2 7 7yX7 42y XSy3 7 XZy2 collecty 7 3x X5y3 7 XZy2 7K3 7 7X7 42y 102 Problem 2 20 points Use symbolic processing to solve for the exact roots of the expression W 2X2 2X2 1 fx2x22 1 1 2 Problem 3 25 points 7 4 1 1 2 Graph on an XY plot the expression fx cosx x equot quot across an x Z Z 2 axis range of 10 to 10 and for a yaxis domain of 2 to 3 Draw the i1 1 trace red and change the axis style to crossed Also plot as a solid bquot 1 20 j blue line the function gx 1Ax 1 on the same axes Solve for all points of intersection of these two functions that are visible in this plot N Nlquot N VNlu x fx cosxe 1 gx 0 25x71 y i NIL T NI7 l N VNP 4 fx solve x 7 quoti 7 1 1 1zo 2 2 1T 1 2 7 1 Z tztgtj 0 MI 0 6 l Ng le ls l N 4 1 fX SE a l T l7 N l N NI x1 rootfx 7 gxxe1o 6143 rootfx 7 gxx5e 5 294 rootfx 7 gxxo5 2174 DA Rockstraw PhD PE Problem 4 20 points Write a function in Mathcad that is called using the statement Pythagorean a b where a and b represent the legs of a right triangle The function should return a threeelement vector where the first vector is the length of the hypotenuse and the next two elements are the acute angles of the triangle in units of degrees Demonstrate operation of the function for a triangle with leg of lengths of 3 and 4 pythagorean ab c0 lt a b 0 1E 180 02 lt acos 0 7 return 0 i 5 pythagorean34 3687 L533 Problem 5 10 points In you deposit P dollar at an annual interest rate of i compounded monthly each month interest in the amount P x i12 is deposited into your account providing a new principle of P P x i12 Write a program that takes as inputs the principle P the annual interest rate i the number of compounding periods per year f and the number of years over which the principle is kept in the bank n and returns the total amount of money in the account at the end of that period Use the program to calculate the total amount in your savings account if you deposit 100 at 10 interest compounded quarterly f4 for two years balancePnf i balance0 lt P for k E 0nf i balancekJr1 lt balancek balancek f return balance n f balance1002401 12184 DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Spring 2006 Exam 1B Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or sup licate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules 0 Open Bookamp Notes 0 Cut and Paste functions and script files you are requested to prepare as well as sessions from the command window in Matlab7 that demonstrate the operation of a program you have prepared to a Microsoft Word file Save the file under the name ChE111X1doc where should be your last name Delete the blank carriage returns from a command window session to reduce the size of the file gtgt 2 fun37 Delete this line Z i Delete this line 303 Delete this line gtgt 0 Email the file containing your solution to drockstrnmsuedu Assure you have delivered it to the correct address files will not be accepted after class 0 Sign this document and leave with the exam proctor before leaving the exam room D A Rockslraw Ph D P E Problem 1 20 points a Write a function that applies the law ofcosines for calculating the l h e side of a triangle when the angle opposite and the adjacent side lengths are known The law ofcosines is r2 a2 12 7 ZabcosC The function should be called as follows cosines ab C while 17 a returning the value of c b Apply the function in the command window to calculate the length of the side opposite a 122 angle when adjacent sides are 4 and 6 cm C function c cosinesabC csgrtaA2bA2i2abcosC180pi gtgt cosines46l22 ans 87998 Problem 2 20 points a Write a script file lGimain m that calculates performs the law of cosines calculation When executed from the command window the script should first announce that the ensuing calculation will apply the law of cosines then ask the user for the two side lengths and the include an le size in degrees The script file should use the function from Problem 1 to perform the calculation after input of the arguments b Execute the script in the command window for the same conditions specified in Problem 1 This script applies the law of cosines 6 using the function quotcosinesabCquot disp Law of Cosines calculationW number of degrees in the known angle 39 length of an adjacent side 39 length of the other adjacent side 39 Q Q OU WO O A A o u H s m u E o 0 isp length of side opposite W iSP C gtgt Lawioficosines Law of Cosines calculation Enter the number of degrees in the known angle 122 Enter the length of an adjacent side Enter the length of the other adjacent side 6 length of side opposite 87998 DARocK mwPhDRE Problem 3 20 points a Define y x3 x 45in x e39 as a function named whym b Plot the function across the range 2 g X g 2 c Use builtin functions to identify the zeros and the minima in the plotted range of X To identify a technique using a builtin function to find local maxima open the help window and type the word maximization in the search index for box a function y whyx y XA3 x 4sinx exp x gtgt x 2000122 4 gtgt yWhyx gtgt plotxy gtgt fzero39why390 ans 02659 1 gtgt fzero39why39l5 n ans 13175 gtgt fminbnd39why390l5 r 7w 4 rm n m i w ans 08382 the help page suggests that to find a local maximum change the sign in the function as follows 7 A3 x 39nx expX gtgt fminbnd39why39 l5m ans ll261 Problem 4 5 points Given x 5 2i determine i the magnitude and ii the angle in degrees of the imaginary number gtgt x52i X 50000 20000i gtgt absx ans 53852 gtgt anglexl80pi ans 218014 DA Rockstraw PhD PE Problem 5 15 points a Define matrix A at right using a builtin function do not use the command A 200020002 or the array editor b Change the zero in the first row second column to a 7 without A redefining the entire array c Use a builtin function to create the row vector B that represents the sum of each column of matrix A from part b d Use matrix multiplication to find the product of A and B matrix multiplication is not commutative so the order ofthe product can only be performed one way OON ONO NOO gtgt A2eye3 A 2 0 0 0 2 0 0 0 2 gtgt Al27 A 2 7 0 0 2 0 0 0 2 gtgt BsumA 9 2 gtgt BA ans 4 32 4 Problem 6 20 points se a While loop in a script file to find the minimum value of k for which the inequality is true 1 1 3 2 lt 1073 2k 2k The script should print the value of k and the difference represented by the left side ofthe above inequality Execute the function at the command window diff 100 2 while absdiff gt 0001 diff2kA 3 2kA 2 k k 1 end diffabsdiff disp39k39 dispk disp39diff39 dispdiff gtgt whiletest k 17 diff 94604e 004 DA Rockstraw PhD PE NEW MEXICO STATE UNIVERSITY Department of Chemical Engineering Ch E111 Chemical Engineering Calculations Fall 2006 Exam 4 Full Name please print SOLUTION Social Security Number By my signature I attest that the work contained within this exam is a result of my own efforts I did not receive rowde or sup Iicate 39 y 39 39 g 39 39 39 Further I understand that if found guilty of ethical violations regarding my solution to this exam I will be punished t the maxi m t n I wable descri d u der quot ademic Misconductquot in the NMSU Student Handbook I understand the quotStudent Code of Conductquot provides policies and procedures that will be followed by the faculty member administering this examination should an accusation be made by xam proctor or a fellow student Finally I accept and agree to ful ll my responsibility to report in writing to the supervising professor should I observe any solicitation for assistance or action that can be regarded as cheating within 24 hours of the completion of the exam Signature Date Examination Rules amp Directions 0 Open Bookamp Notes Save the file under the name ChE111X4xmcd where should be your last name 5 points Email the file AS AN ATTACHMENT to drockstrnmsuedu Files will not be accepted after 105 PM Thursday 12072006 0 Sign this document and turn in before leaving the exam D A Rockslraw Ph D P E Problem 1 10 points Use symbolic processing to factor the expression 23 322 7 4 Z3 322 7 4 factor 7 2 22z71 Solve the expression q4 77q3 7 3q2 23q 14 for q i 1 i 2 i 7 q4 7 7q3 7 3q2 23q 714solveq 7 Problem 2 20 points Use a solve block to find the solution to the following system of linear equations 5X3y73z71 2X7yz4 7x7377z71 initial guesses 5X 3y 7 32 71 2X7 y z 4 1 findxyz 15 35 7X7 3y 7 z 71 DA Rockstraw PhD PE Problem 3 25 points Graph on an XY plot the expression fx 7 i Draw the trace red and 10 10 10 change the axis style to crossed Also plot as a solid blue line the function gx 2x 1 on the same axes Solve for all points of intersection of these two functions Hint You may have to adjust the range of the plot to see the intersection points to make the initial guesses of your points of intersection wail zf fee 150quot 100quot 50quot fX 39200 X 0 rootfx 7 gxx 71006 X 50 rootfx 7 gxx 49312 X 750 rootfx 7 gx X 738306 0 gt Rockstraw PhD PE Problem 4 20 points Write a function called regressxy that accepts as arguments equallysized vectors x and y and returns a 3x1 vector that contains the slope intercept and correlation coefficient of the regression line put through the points Use the builtin functions slopexy interceptxy and corrxy2 in your function Execute your function with the vectors x 1 2 3 4 5 and y 2 5 813 17 and store the solution in a vector named line Define a function fx that references the slope and intercept elements of the vector line to define the line Execute f24 Plot fx as a line and include the data points on the plot Place correlation coefficient R2 on the plot m V 2 5 X 3 y 8 4 13 regress Xy s1 lt slopexy L5 L17 int lt interceptxy R2 lt corrxy2 s1 38 int line regress X y line 724 R2 0989 fx line X line 0 1 R21ir1e2 f24 672 R2 0989 DA Rockstraw PhD PE Problem 5 20 points Write a program to determine the kinetic energy correction factor on of the mechanical energy balance by calculating the Reynolds number Re forflow in a pipe given the DV p inside diameter of a pipe D the average fluid velocity Vavg the fluid density Re i p and the absolute fluid viscosity at the system temperature u The correction factor x 105 if Re 2 6000 and x 2 if Re 2100 In the transition range between these two limits of Re x cannot be determinedquot Execute the program to calculate x for the case in which a fluid of density 950 kgm3 and viscosity 0012 poise is flowing in a pipe of 2 inch diameter at 3 ms setAlpha DVavg p u 0c lt quotcannot determine Dv p Re 6 amp p on 105 if Re26000 oce2 ifReSZIOO 01 kg 950 u 0012pose 3 m D 2in V 3 m avg 0c setAlpha DVavg p u 0c105 DA Rockstraw PhD PE

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.