22
Non -linear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation of kobs and kreal. 1. From File click on New.., then on General Workbook: 1 If you have any comments, please contact Dr. Mircea Gheorghiu. 1 WARNING NOTICE: The experiments described in these materials are potentially hazardous and require a high level of safety training, special facilities and equipment, and supervision by appropriate individuals. You bear the sole responsibility, liability, and risk for the implementation of such safety procedures and measures. MIT shall have no responsibility, liability, or risk for the content or implementation of any of the material presented. Legal Notices Written by M. D. Gheorghiu

Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

  • Upload
    others

  • View
    7

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

Non -llinear Curve fitting with Microsoft Excel Solver.

1

Calculation of kobs, kreal and Debye-Hückel plot.

I. Kinetics: calculation of kobs and kreal.

1. From File click on New.., then on General Workbook:

1 If you have any comments, please contact Dr. Mircea Gheorghiu.

1

WARNING NOTICE: The experiments described in these materials are potentially hazardous and require a high level ofsafety training, special facilities and equipment, and supervision by appropriate individuals. You bear the sole responsibility, liability, and risk for the implementation of such safety procedures and measures. MIT shall have no responsibility, liability, or risk for the content or implementation of any of the material presented.

Legal Notices

Written by M. D. Gheorghiu

Page 2: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

2. From File, Save as… the workbook. My preference for file name is Kinetics_MG (MG are my initials) and it is saved in the Personal folder.

2

Page 3: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

3. Five sheets are necessary in your workbook. Four are for Kinetics data. The fifth is for Debye_Huckel calculation. You have to append these five sheets to your written or Oral report.

If there are not enough Sheets, click Insert and then Worksheet.

Name four sheets, each for a kinetic run. For example, I have chosen: KineticsA (for the 0.02M NaNO3), KineticsB (for the 0.05M NaNO3), KineticsC, (for the 0.1M NaNO3) and KineticsD (for the 0.2M NaNO3).

3

Page 4: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

4. Now is time to add your experimental data to the four sheets. Take for example, Kinetics_B sheet. Type in column A, the time (in seconds), and in column B the experimental absorbances (@420nm) corresponding to the respective time. Add on the Table two more columns. One for calculated absorbances (from equation 3) and a second column for the square of the difference experimental absorbances (column B)-calculated absorbances (column C).

4

Page 5: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

5. Just as a reminder, the second order integrated kinetic equation, as it was presented to you in my hand-out, is printed next. The meaning of variables are the same as in the hand-out and the Lab Manual:

) tk c exp(A

A A 1

1A A obs f

f f

−−

− =

0

0 (3)

Integrated second order kinetic equation in terms ofabsorbance that is curve-fitted to the experimental data.A0= initial absorbanceA = absorbance at time tAf = absorbance when all H2Asc has reacted.

6. We are now just a step before using Microsoft Excel Solver. On each kinetic sheet one must add cells containing two sets of information. In cells H2 and H3 are typed the values of the “fixed” variables A0 and epsilon, respectively. The content of the cells H5 (Af value) and H6 (kobs) is changing. Intially, “guess” values are typed in for the variables of Af and kobs. After the minimization process, Solver returns the regression coefficients in the changing cells H5 and H6, respectively. Solver is not providing the standard deviations of the coefficients.

7. In order to be automatically plug into the kinetic equation, the cells containing the values of A0, epsilon, Af, kobs must be given a name (this is an Excel requirement).

• For A0, type =B2 in cell H2 • For epsilon type in cell H3, the value obtained by you for epsilon (calculated

from Lambert-Beer equation, recorded during day #1). The slope of the least square straight line, calculated from my results, gave ε = 1020.

• Type in cell H5 the best guess value for Af, that is 0.25 (Why?). • Type the your guess value for kobs in cell H6. My guess is 5.

5

Page 6: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

In order to be automatically inserted in equation 3, A0, epsilon, Af and kobs must be assigned a name. For example to name A0, first click on cell H2. Than click on Insert, Name, Define:

The following window pops-up:

Please notice and check the correct location of the value of A0, in this case is (according to Excel grammar): KineticsB!$H$2, that is on KineticsB sheet and location H2. Click on add button. Click on OK. The naming continues for cells H3:H5. Next, let us name as t the vector A2:A22. First highlight the column A2:A22, then click on Insert, Name, Define and change the names in workbook as t (check Refers to address in order be correct). The Define Name window will look like:

6

Page 7: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

8. Solver optimizes the curve fitting in two steps:

• In the first step, “crude” values of absorbances are calculated. • In the second step, the optimization step, the crude values of calculated

absorbances are refined to best fit to experimental values.

A. The “Crude” Step:

Type in cell C2 =Af/((1-((A0-Af)/A0)*EXP(-kobs*t*Af/epsilon))). Cell H2 is filled with the calculated absorbance for t=0 seconds. According to equation 3 it is equal with A0.

7

Page 8: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

In order to fill in cells C3 through C22, click on cell C2. Bring the cursor to the right low corner and press left mouse. Drag all the way down to cell C22. Depress the left mouse. All cells (C2:C22) are now filled in with the calculated (“crude”) Absorbances:

8

Page 9: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

NonNonNon--- ting step.linear curve fitting step.linear curve fitting step.B. Optimization step: Non-linear curve fitlinear curve fitting step.

9. Type in cell D2=(B2-C2)^2. Press Enter key. 10. Click on cell D2. Drag all the way down to cell D22, as it was described for

calculated absorbances. 11. In cell D23 sum (click on icon ΣΣΣΣ) D2 through D22.

Than press Enter key.

12. Click on cell D23. Click Tools and than Solver…

9

Page 10: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

The Solver Parameters window pops-up. The target cell is D23.

Type into By Changing the cells: H5 and H6 (that is $H$5 and $H$6).

10

Page 11: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

On Solver Parameters click on Options. Change Max Time to 1200 seconds (kinetics run time). Click OK.

The Solver Parameters window comes back. Click first on Min and than on Solve button:

11

Page 12: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

The Solver Results window pops-up. Note that the values in cells H4 and H5 are updated. You know by now the value of kobs as 2.60. Note that the initial value the “guess”} has been taken as 5.

You can print some reports: answer, sensitivity and limits. For Example the Answer Report looks like:

12

Page 13: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

Repeat steps 4 through 12 for sheets KineticsA, KineticsC and KineticsD. Whenever is necessary, please update the Reference in the Define Name window.

II. Debye-Hückel equation.

In the “Kinetics” hand-out (see there the meanings of variables), the Debye-Hückel equation is defined as:

I1 / 2 I1 / 2

log k real = log k 0 + 1.02 * Z1 * Z 2 1 + I1 / 2 = log k 0 + 1.02 * 3 * 1 + I1 / 2 (6)

where kreal is given by equation (4):

k real = k obs [H + ] (4)K a1

Use the sheet#5 (renamed as Debye-Hückel) to compute and draw the linear plot logkreal (y axis) versus I0.5/(I0.5+1) (x axis). When fished the contend of the Debye-Hückel worksheet will look like:

13

Page 14: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

1. Build a Table of 7 columns and 5 rows. The order and the content of the headings are suggested in Fig. X. Remember that in Excel x-axis values have to stay left to y-axis values (for example, column A values are on x-axis, column B values are displayed on y-axis).

2. Fill in kobs values by reading the address from the respective worksheet. Click, for example on cell C2 and type: KineticsA!$H$6. Cell two is filled with the value 2.07 for kobs. Cell C3 has to be filled with KineticsB!$H$6, cell C4 with KineticsC!$H$6 and cell C5 with KineticsD!$H$6.

14

Page 15: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

3. Add on the worksheet information regarding the HNO3 molarity (cell B7). Type the acidity constant for ascorbic acid (Ka1=6.76*10-5) into cell B8.

4. Fill in the column D2 through D5 with calculate kreal (see equation 4). For example in cell D2: =(C2/$B$8)*0.5*$B$7 (0.5 appears because the HNO3 in the UV cuvette is the half diluted HNO3 stock solution). Because cells B7 and B8 are referred to absolute address, for example $B$7, you can generate automatically the content of the subsequent D2:D5 cells. Click on D2, move the cursor to right lower corner and pressing left mouse, drag all the way down to D5. Cells are filled automatically.

15

Page 16: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

5. Calculate logkreal in cell D2 as LOG10(D2). Drag the cell content as described above all the way down to B5:

6. The remaining calculation refers to I0.5/(I0.5+1) the x-axis variable calculation in column A.

• First fill in NaNO3 stock solution molarities. In my experiments I used the values printed in columns E2:E5.

• Second, in column F2:F5 calculated the real NaNO3 + HNO3 molarities. For example in cell F2, calculate =(E2+$B$7)*0.5. Multiplication with 0.5 is because in the UV cuvette the stock solution become half diluted as result of the 3 mL+ 3mL mixing (see the experiment and handouts). Remember that for monovalent anions and cations, molarities are numerically equal to Ionic Strength.

16

Page 17: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

• Third, in cells G2:G5 calculate the square root of value from cell F2:F5. For example, in cell G2 type =SQRT(F2), and press Enter.

• Fourth, in cells A2:A5 calculate I0.5/(I0.5+1). For example, type =G2/(G2+1) in cell A2. Click on the cell. Drag the lower right corner all the way down to A5.

7. The last step consists of the Debye-Hückel plot. • Highlight columns A2:B5. Click on Insert than Chart…:

17

Page 18: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

• In the Chart Wizard window Step 1, choose Chart type: XY(Scatter); and the highlighted Chart sub-type.

• Click next to steps 2 and 3. Fill in the chart title, value (X) axis and value (Y) axis respectively.

18

Page 19: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

• Click Next and than Finish. • After a few editing, the graph looks:

• The least square straight line is added on the graph, by clicking on Chart, than Add trendline..

19

Page 20: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

Choose Type the Trend/Regression type, Linear.

• Click on Options. Check display equation on the chart and Display R-squared value on the chart:

20

Page 21: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

• The least square straight line has the equation: y = 2.7835x + 1.8686 and R2=0.9809 (satisfactory, however I am confident that 5.310 students will get a better R2).

8. In order to compute the slope (1.02*Z1*Z2) and intercept, ko (rate constant at I=0), and R2, let first add these cells (H10:H12) to the Debye-Hückel worksheet.

• Type =SLOPE(B2:B5,A2:A5) into cell next (B10) to Slope=. • Type = INTERCEPT(B2:B5,A2:A5) into cell next (B11) to Intercept= • Type =10^B11 into cell next (B12) to k0= • Type =RSQ(B2:B5,A2:A5) next (B13) to R^2=

21

Page 22: Calculation of kobs, kreal and Debye-Hückel plot....Non -llinear Curve fitting with Microsoft Excel Solver. 1 Calculation of kobs, kreal and Debye-Hückel plot. I. Kinetics: calculation

22