{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw_5 - 2 2 2 m m m m RT a f V P V b V bV b α = =-Where r c...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
PGE 310: Numerical Methods with Matlab Homework #5 Due Thursday, Mar 5 2009 You must turn in a hard copy of all ‘.m’ files and any plots/results in the command window. Additionally, you must upload electronic versions of .m files to blackboard. We will randomly select a few each week and check to see if they run. Be sure to include lots of comments, a prologue (see book/pp notes) for function files, and meaningful variable names in all .m files. 1. Computing and Unavoidable Errors (25 points) a) convert the binary number 1010111 to base 10 number b) convert the base 10 number 27 into a binary number c) Use Taylor’s series and the knowledge that sin(0) 0 = , calculate sin(0.1) for the first three terms and give relative error respectively. d) Explain in a couple sentences the difference between round off error and truncation error. 2. The Peng-Robinson Equation of State is often used to describe the Pressure, Volume, Temperature relationship of gases in petroleum reservoirs. It is given by:
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 2 ( ) 2 m m m m RT a f V P V b V bV b α =-+ =-+-Where, r c T T T = ; R= 83.14 cm3-bar/(mol-K) (a) Create a MATLAB function file called Peng_Robinson.m that when returns the value of f, when sent the Volume (Vm), Pressure (P), Temperature, critical temperature (Tc), critical pressure (Pc), and ϖ . Hint: In the function file, the values of a, b, alpha, and Tr will be first computed so that f can be calculated. (25 points) (b) Create a MATLAB script file to plot f(V) versus V for Butane with proper annotations (25 points). Use the plot to estimate the root(s) that makes the function zero at P=100 bar and T= 500 °K. Use the following fluid properties for Butane: w = 0.200 Tc = 425.1 K Pc = 37.96 bar 3. Determine the root of f(x)=x 2- e-x using false position. Start with x L =0 and x U =1. Carry out 4 iterations. (25 points). PLEASE FILL OUT THE COURSE SURVEY AT h ttps://web.austin.utexas.edu/diia/oca/ . Your feedback is very important to me....
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern