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

Info iconThis 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:
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background 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

This note was uploaded on 04/21/2010 for the course PGE 310 taught by Professor Klaus during the Spring '06 term at University of Texas.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online