Question: Engineering Background: in modeling an oll reservoir in petroleum engineering, it may be necessary to find a relationship between the equilibrium constant of a reaction

 Engineering Background: in modeling an oll reservoir in petroleum engineering, it

Engineering Background: in modeling an oll reservoir in petroleum engineering, it may be necessary to find a relationship between the equilibrium constant of a reaction and the pressure at a constant temperature. The data shown in the table below relates equilibrium constants K to pressure (measured in 1000 psia). P 0.6 1 14 18 22 26 3 3.4 3.8 4.2 4.6 5 5.4 K 5.89 4.68 4.1 3.45 3.25 2.69 2.25 1.92 1.55 1.45 1.19 0.99 0.84 Theory says that the K-P relationship should be exponential: If this is true, we need to find the values of the constants A and B for a given set of (P.K) data. You can take the log transform of both sides to get a linear form that will llow ou to use linear regression to find A and B togK = logA + BP Here, we have defined two new variables, K and A' and we expect a linear relationship between K and P. if we send P and K" data to MATLAB's polyfit,it will return B and A. That's great, but we want 8 and A, not A". To get & from A", simply perform the inverse operation of taking the ogarithm. A = exp(A") Follow the steps below using the data above 1. Start a new script logtransformFit.m 2 Create arrays P and K using the data above 3. Create the K array from the K array by taking the natural logarithm of each element 4. Use polyf it ) to get a linear curve fit using P and K" arrays. a Should you use polyfit (K". Pl or polyfit IP.K 5. Get A from A'using the equation above. 6 Use a scatter plot to plot the data points 7. plot the equation K = Aexp (BP) using the A and B values just determined. 8 Submit your script to the proper eCampus subrmission box

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Heres a stepbystep guide to create the MATLAB script logtransformFitm Step 1 Start a New S... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!