Procedure and Experimental Results

Procedure

Part 1

  1. Prepare two (approximately) 2.5μM2.5μM solutions of [Ru(bpy)3]2+[Ru(bpy)3]2+, the solvent for the first is ethanol and the second solution glycerol is the solvent. The starting solutions have concentrations of 0.10mM0.10mM [Ru(bpy)3]2+[Ru(bpy)3]2+ in ethanol and glycerol.

    1. The dilution of the glycerol solution must be carried out gravimetrically using the denisty of glycerol at 20oC20oC (1.26g/cm3)(1.26g/cm3). Warm the glycerol gently to less than 60oC60oC in order to facilitate the dilution process. The solutions will need to cool to room temperature again.
    2. Consider how much of each solution you prepare because of subsequent solutions you will need to prepare and knowing cuvettes typically hold 2-3 mL.
    3. Prepare ethanol solution volumetrically
  2. Acquire the luminescence decay curves as directed by your instructor for the two-air equilibrated. Make sure to record the procedure for data collection here. Collect all fluorescence decay curves in triplicate.

      1. Procedure

        1. With shutter closed place sample cuvette into the photomultiplier tube box
        2. Once sample is placed, adjust oscilloscope to acquire luminescence curve
        3. Once the proper adjustment has been made for the curve, record the luminesce curve with the computer terminal
        4. Repeat for the other sample
  3. Ethanol solution Luminescence decay curve recorded first followed by glycerol solution

    1. Each solution had 3 measurements recorded </font>
In [2]:
# import packages for calculations 

import numpy as np
import pandas as pd
import re
import os
import matplotlib.pyplot as plt
import math
import scipy.optimize as opt
import seaborn as sns

from datascience import *
from scipy import stats

%matplotlib inline

Calculations: Part 1

  1. In doing these calculations, the exact concentration of the fluorescing species [M]t[M∗]t and [M]0[M∗]0 does not need to be known. Why is that?
    1. The data that you need to analyze are the voltages from the PMT collected via the oscilloscope. The x-axis for this plot is time and should be in nanoseconds. Your first data point should be at t0=0nst0=0ns. This remaining time values can be determined accordingly.
In [3]:
# read in files in data folder (which are space deliminated) and
# seperate them based on spaces

# parsing function
def parseSDV(inFile, minSpaces, startline):
    line = inFile.readline()
    lineNum = 1
    
    dataList = []
    
    while line:
        if lineNum >= startline:
            parsedLine = re.sub('\n', '', line)
            parsedLine = re.split(r'\s{' + str(minSpaces) + ',}', parsedLine)
            dataList.append(parsedLine)
        line = inFile.readline();
        lineNum += 1
        
    return dataList

currentDir = os.getcwd()
dataDir = currentDir + '/data_files/'
dataset = {}

for filename in os.listdir(dataDir):
    openFile = open(dataDir + filename, 'r')
    parsedList = parseSDV(openFile, 2, 5)
    dataset[filename[:-4]] = parsedList
    openFile.close()
    
# Convert Data in dataset to tables
for key in dataset:
    
    # Convert list to dataframe
    df = pd.DataFrame(dataset[key][1:], columns=dataset[key][0])
    
    # Convert dataframe to table
    dataset[key] = Table().from_df(df)
    
    # Set values to float (decimals)
    label_1 = dataset[key].labels[0]
    label_2 = dataset[key].labels[1]
    col_1 = dataset[key].apply(float, dataset[key].labels[0])
    col_2 = dataset[key].apply(float, dataset[key].labels[1])
    dataset[key] = Table().with_columns(label_1, col_1, label_2, col_2)
    
    # Start from t_0 >= 0 (positive)
    dataset[key] = dataset[key].where(dataset[key].labels[0],
                                     are.above_or_equal_to(0))

Dataset Names

Data taken in replicates of 3, r# means r 1-3

  • Ethanol (part 1)
    • 'ethanol r#'
  • Glycerol (part 1)
    • 'glycerol r#'
  • Ethanol degased in argon/oxygen
    • 'ethanol dg argon r#'
    • 'ethanol dg oxygen r#'
  • Glycerol 33%/66% by weight
    • 'glycerol 33 r#'
    • 'glycerol 66 r#'
In [4]:
dataName = 'glycerol 33 r3'
dataset[dataName].plot(0)
  1. Open up the .csv file and copy the data into the “identification” sheet in the lifetime_fitting excel. In “data” use the function “text to columns” to separate the data into columns.
    1. This sheet will be used to identify the range of data that is at about half the initial intensity to about one-tenth the initial intensity. For example, if the initial minimum intensity was 45mV−45mV, the exponential fit would run from 22.5mV−22.5mV down to 4.5mV−4.5mV. The reason we need to fit this range is the first portion is saturated and will not give an accurate representation of the fluorescent lifetime.
In [5]:
# Determine Best Continuity in Relevent data

def relevancyDetermination(val, min40, min10):
    return val > min40 and val < min10

def bestContinuity(function, data_array):
    best_start = 0
    for i in range(data_array.size):
        best_num = Continuity_Number(relevancyDetermination, data_array, best_start, 0)
        alt_num = Continuity_Number(relevancyDetermination, data_array, i, 0)
        
        if alt_num > best_num:
            best_start = i
            
    return best_start
    
def Continuity_Number(function, data_array, start, count):
    minVal = np.min(data_array)
    min40 = minVal * .4
    min10 = minVal * .1
    
    if start < data_array.size:
        if function(data_array[start], min40, min10) and start < data_array.size:
            return Continuity_Number(function, data_array, start + 1, count + 1)
        else:
            return count
    else:
        return count
        
        
In [6]:
bestContinuity(relevancyDetermination, dataset['glycerol 33 r2'][1])
Out[6]:
168
In [7]:
# Identify Relevent Data

for key in dataset:
    minVal = np.min(dataset[key][1])
    min40 = minVal * .4
    min10 = minVal * .1
    
    relevent_Table = Table(dataset[key].labels)
        
    best_start = bestContinuity(relevancyDetermination, dataset[key][1])
    
    for row in np.arange(best_start, dataset[key].num_rows):
        if not relevancyDetermination(dataset[key][1][row], min40, min10):
            break
        else:
            relevent_Table = relevent_Table.with_row(
            dataset[key].row(row))
            
    dataset[key] = relevent_Table
In [8]:
dataset['glycerol 66 r2']
Out[8]:
Time (Secs) CHAN2
1e-06 -0.00750025
1.04e-06 -0.006719
1.08e-06 -0.007344
1.12e-06 -0.00593775
1.16e-06 -0.0070315
1.2e-06 -0.00562525
1.24e-06 -0.00500025
1.28e-06 -0.005469
1.32e-06 -0.00437525
1.36e-06 -0.0051565

... (11 rows omitted)

In [9]:
dataName = 'glycerol 66 r2'
dataset[dataName].scatter(0,1)
plt.xlim(np.min(dataset[dataName][0])* 0.8, np.max(dataset[dataName][0])*1.1)
plt.ylim(np.min(dataset[dataName][1]) * 1.1, np.max(dataset[dataName][1])*.8)

plt.ticklabel_format(style='sci', axis='x', scilimits=(0,0))
In [10]:
dataSetCopy = dataset.copy() # copy dataset to make undoing easier 
In [11]:
dataset = dataSetCopy.copy() # RESET TO ORGINAL IMPORT
In [12]:
# permutate data appropriately (based on excel)
In [13]:
# Relabel For Clarity 

for key in dataset:
    dataset[key] = dataset[key].relabeled('Time (Secs)', 'Raw Time (secs)')
    dataset[key] = dataset[key].relabeled('CHAN2', 'Raw Voltage (volts)')
In [14]:
# correct time
def correctTime(Table, columnName):
    timeColumn = Table.column(columnName)
    correctedTimeColumn = []
    
    for i in range(timeColumn.size):
        if i == 0:
            correctedTimeColumn.append(0)
        else:
            correctedTime = correctedTimeColumn[i-1] + (
                timeColumn[i]-timeColumn[i-1])*(10**9)
            
            correctedTimeColumn.append(correctedTime)
    
    return Table.with_column('Corrected Time (ns)', correctedTimeColumn)
        
# Flip voltage   
def flipVoltage(Table, columnName):
    voltageColumn = Table.column(columnName)
    flippedVoltageColumn = []
    
    for i in range(voltageColumn.size):
        flippedVoltage = voltageColumn[i]*(-1)
        flippedVoltageColumn.append(flippedVoltage)
        
    return Table.with_column('Flipped Voltage (volts)', flippedVoltageColumn)

def allPositiveVoltage(Table, columnName):
    flippedVoltageColumn = Table.column(columnName)
    allPositiveVoltageColumn = []
    
    minFlippedVoltage = np.min(flippedVoltageColumn)
    
    for i in range(flippedVoltageColumn.size):
        allPositiveVoltage = flippedVoltageColumn[i] - minFlippedVoltage
        allPositiveVoltageColumn.append(allPositiveVoltage)
    
    return Table.with_column('All Positive Voltage (volts)', allPositiveVoltageColumn)
In [15]:
# apply permutations

for key in dataset:
    dataset[key] = correctTime(dataset[key], 'Raw Time (secs)')
    dataset[key] = flipVoltage(dataset[key], 'Raw Voltage (volts)')
    dataset[key] = allPositiveVoltage(dataset[key], 'Flipped Voltage (volts)')
In [16]:
dataset['glycerol 66 r2']
Out[16]:
Raw Time (secs) Raw Voltage (volts) Corrected Time (ns) Flipped Voltage (volts) All Positive Voltage (volts)
1e-06 -0.00750025 0 0.00750025 0.00515625
1.04e-06 -0.006719 40 0.006719 0.004375
1.08e-06 -0.007344 80 0.007344 0.005
1.12e-06 -0.00593775 120 0.00593775 0.00359375
1.16e-06 -0.0070315 160 0.0070315 0.0046875
1.2e-06 -0.00562525 200 0.00562525 0.00328125
1.24e-06 -0.00500025 240 0.00500025 0.00265625
1.28e-06 -0.005469 280 0.005469 0.003125
1.32e-06 -0.00437525 320 0.00437525 0.00203125
1.36e-06 -0.0051565 360 0.0051565 0.0028125

... (11 rows omitted)

In [17]:
dataset['glycerol 66 r3'].scatter(2, 4)
  1. Copy the data from columns B & C where there is a long series of 1’s in a row. Paste this into T1 starting at A2. This should fill in the columns raw time and raw voltage. Corrected time, flipped voltage, and all positive voltage should fill in.
    1. What are the equations in these cells and why do they work?
  2. We aren’t converting voltages to concentrations, why don’t we need to do that?
  3. Equation 6 is the model that theoretically describes our experimental data. In F2, set up a calculation that calculates a theoretical value of voltage for each time point. Use the cells in K1:K3 for your constants.
  4. In G, calculate the square of the difference between the theoretical and experimental voltages.
In [18]:
# function to calculate theoretical
def theoreticalVoltage(M_star_0, k_obs, offset, time):
    # based on equation 6
    theoretical = M_star_0 * math.exp(-k_obs*time)
    # add offset
    theoretical += offset
    
    return theoretical
In [19]:
# remove unneeded columns 

for key in dataset:
    dataset[key] = dataset[key].select('Corrected Time (ns)', 
                                       'All Positive Voltage (volts)')
  1. K4 contains the sum of these squares. Use solver to minimize this difference. What is the k_obs from this non-linear fit?
In [20]:
# solve for [M*]o k_obs, and offset


# add theoretical column 
def addTheoreticalColumn(table, constants):
    
    m_star = constants[0]
    k_obs = constants[1]
    offset = constants[2]
    theoretical_column = []
    
    # calculate theoretical
    for time in currentTable.column('Corrected Time (ns)'):
        theoretical_column.append(theoreticalVoltage(
            m_star, k_obs, offset, time))
        
    return table.with_column('Theoretical Voltage (volts)',
                            theoretical_column)

# Chi-squared as a function of guess
def chiSquared(guess):
    m_star = guess[0]
    k_obs = guess[1]
    offset = guess[2]
    
    theoretical_column = []
    diff_squared_column = []
    
    # calculate theoretical
    for time in currentTable.column('Corrected Time (ns)'):
        theoretical_column.append(theoreticalVoltage(
            m_star, k_obs, offset, time))
        
    # calculate difference squared 
    for row in range(currentTable.num_rows):
        allpos = currentTable.column('All Positive Voltage (volts)')
        
        difference = allpos[row] - theoretical_column[row]
        
        diff_squared_column.append(difference**2)
        
    chi_sqaured = sum(diff_squared_column)
    return chi_sqaured
In [21]:
# mimize chi-squared for each set of data and record constands for each

# Initial guess for minimization of Chi-squared
initialGuess = [0.131561133, 0.000005735, -0.111488389]

# Dictionary to hold values once determined
Constants = {}

for key in dataset:
    
    # set current table to be calculated 
    # also exclude first datappoin as it tends to be an outlier (not all the
    # time but almost always)
    currentTable = dataset[key]
                           
    solution = opt.minimize(chiSquared, initialGuess).x
    
    #save solution to Constants dictionary 
    Constants[key] = solution
    
    # add theoretical data as a column to table
    dataset[key] = addTheoreticalColumn(currentTable, solution)
In [22]:
# Create Table of Solved Constants

TableOfConstants = Table(['Data Name', '[M*]o', 'k_obs', 'Lifetime (ns)', 'offset',
                              'chi-squared'])

for key in Constants:
    
    currentTable = dataset[key]
    TableOfConstants = TableOfConstants.with_row([key, Constants[key][0],
                                                  Constants[key][1],
                                                  1/Constants[key][1], 
                                                  Constants[key][2], 
                                                  chiSquared(Constants[key])])
In [23]:
dataset['glycerol 66 r2'].plot(0)
In [24]:
TableOfConstants.show(20)
Data Name [M*]o k_obs Lifetime (ns) offset chi-squared
glycerol 66 r2 0.121835 5.4749e-05 18265.2 -0.117026 4.51556e-06
ethanol dg argon r3 0.0163302 0.00397253 251.729 -0.00586045 4.48755e-05
ethanol dg argon r1 0.0167296 0.00354333 282.221 -0.00617103 6.49597e-07
glycerol r1 0.0312788 0.000745855 1340.74 -0.0109591 1.64298e-05
glycerol r3 0.0315816 0.000704902 1418.64 -0.0115111 1.97281e-05
ethanol dg oxygen r1 0.029417 0.00974727 102.593 -0.00778535 1.55013e-05
ethanol r1 0.121232 0.000180004 5555.44 -0.115771 3.19341e-05
glycerol 33 r3 0.00799309 0.0126678 78.9402 -0.00184025 5.48506e-07
glycerol 66 r3 0.121344 5.16415e-05 19364.3 -0.117971 7.88281e-05
glycerol r2 0.0316067 0.000737078 1356.71 -0.011397 7.81191e-05
ethanol dg argon r2 0.0193738 0.00292502 341.878 -0.00863833 7.68014e-06
glycerol 33 r2 0.00836821 0.010124 98.7754 -0.0024435 1.01432e-05
ethanol r2 0.121027 0.000196016 5101.62 -0.114745 1.368e-05
ethanol dg oxygen r2 0.0336521 0.00748018 133.687 -0.0163602 1.34947e-06
ethanol dg oxygen r3 0.0319542 0.011887 84.1254 -0.00836131 4.59969e-06
ethanol r3 0.119426 0.000174391 5734.24 -0.114589 2.1878e-05
glycerol 33 r1 0.00929059 0.00921719 108.493 -0.00312391 3.28091e-06
glycerol 66 r1 0.12108 5.5067e-05 18159.7 -0.116508 5.06853e-06
In [25]:
# average replicates 

AvgTableOfConstants = Table(TableOfConstants.labels)

experiment_name = ['ethanol dg argon r', 'ethanol dg oxygen r', 'ethanol r',
                  'glycerol 33 r', 'glycerol 66 r', 'glycerol r']

for name in experiment_name:
    set_of_replicates = TableOfConstants.where('Data Name',
                                              are.containing(name))
    AvgTableOfConstants = AvgTableOfConstants.with_row(
        [name[:-2], set_of_replicates[1].mean(), set_of_replicates[2].mean(),
         set_of_replicates[3].mean(), set_of_replicates[4].mean(),
         set_of_replicates[5].mean()])
In [26]:
AvgTableOfConstants
Out[26]:
Data Name [M*]o k_obs Lifetime (ns) offset chi-squared
ethanol dg argon 0.0174779 0.00348029 291.942 -0.00688993 1.77351e-05
ethanol dg oxygen 0.0316744 0.00970482 106.802 -0.0108356 7.15015e-06
ethanol 0.120561 0.00018347 5463.77 -0.115035 2.24973e-05
glycerol 33 0.00855063 0.0106697 95.4028 -0.00246922 4.65755e-06
glycerol 66 0.121419 5.38192e-05 18596.4 -0.117168 2.94707e-05
glycerol 0.031489 0.000729278 1372.03 -0.0112891 3.80923e-05
  1. What is the tobs(lifetime)tobs(lifetime)?
In [27]:
AvgTableOfConstants.select(0,3)
Out[27]:
Data Name Lifetime (ns)
ethanol dg argon 291.942
ethanol dg oxygen 106.802
ethanol 5463.77
glycerol 33 95.4028
glycerol 66 18596.4
glycerol 1372.03
  1. Repeat for all data sets.
In [28]:
dataset['ethanol r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Replicate 1')
Out[28]:
Text(0.5, 1.0, 'Ethanol Replicate 1')
In [29]:
dataset['ethanol r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Voltage vs Time')
Out[29]:
Text(0.5, 1.0, 'Ethanol Voltage vs Time')
In [30]:
dataset['ethanol r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Replicate 3')
Out[30]:
Text(0.5, 1.0, 'Ethanol Replicate 3')
In [31]:
dataset['glycerol r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Glycerol Voltage vs Time')
Out[31]:
Text(0.5, 1.0, 'Glycerol Voltage vs Time')
In [32]:
dataset['glycerol r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Glycerol Replicate 2')
Out[32]:
Text(0.5, 1.0, 'Glycerol Replicate 2')
In [33]:
dataset['glycerol r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Glycerol Replicate 3')
Out[33]:
Text(0.5, 1.0, 'Glycerol Replicate 3')
In [34]:
dataset['glycerol 33 r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('33% by Weight Glycerol Replicate 1')
Out[34]:
Text(0.5, 1.0, '33% by Weight Glycerol Replicate 1')
In [35]:
dataset['glycerol 33 r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('33% by Weight Glycerol Replicate 2')
Out[35]:
Text(0.5, 1.0, '33% by Weight Glycerol Replicate 2')
In [36]:
dataset['glycerol 33 r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('33% by Weight Glycerol Replicate 3')
Out[36]:
Text(0.5, 1.0, '33% by Weight Glycerol Replicate 3')
In [37]:
dataset['glycerol 66 r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('66% by Weight Glycerol Voltage vs Time')
Out[37]:
Text(0.5, 1.0, '66% by Weight Glycerol Voltage vs Time')
In [38]:
dataset['glycerol 66 r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('66% by Weight Glycerol Replicate 2')
Out[38]:
Text(0.5, 1.0, '66% by Weight Glycerol Replicate 2')
In [39]:
dataset['glycerol 66 r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('66% by Weight Glycerol Replicate 3')
Out[39]:
Text(0.5, 1.0, '66% by Weight Glycerol Replicate 3')
In [40]:
dataset['ethanol dg argon r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Argon Voltage vs Time')
Out[40]:
Text(0.5, 1.0, 'Ethanol Degassed in Argon Voltage vs Time')
In [41]:
dataset['ethanol dg argon r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Argon Replicate 2')
Out[41]:
Text(0.5, 1.0, 'Ethanol Degassed in Argon Replicate 2')
In [42]:
dataset['ethanol dg argon r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Argon Replicate 3')
Out[42]:
Text(0.5, 1.0, 'Ethanol Degassed in Argon Replicate 3')
In [43]:
dataset['ethanol dg oxygen r1'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Oxygen Voltage vs Time')
Out[43]:
Text(0.5, 1.0, 'Ethanol Degassed in Oxygen Voltage vs Time')
In [44]:
dataset['ethanol dg oxygen r2'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Oxygen Replicate 2')
Out[44]:
Text(0.5, 1.0, 'Ethanol Degassed in Oxygen Replicate 2')
In [45]:
dataset['ethanol dg oxygen r3'].plot(0)
plt.ylabel('Voltage (Volts)')
plt.title('Ethanol Degassed in Oxygen Replicate 3')
Out[45]:
Text(0.5, 1.0, 'Ethanol Degassed in Oxygen Replicate 3')

Pre-Lab Questions: Part 2

  1. Using Henry’s Law, what is the concentration of dissolved oxygen in the ethanol solution with argon bubbled through it?

[O2]=0[O2]=0

  1. What is the concentration of dissolved oxygen in the ethanol solution without anything bubbled through it? (Use the Tokunaga reference in Moodle.)
  2. What is the concentration of dissolved oxygen in the ethanol solution with oxygen bubbled through it?
  3. Draw what you think will happen to the decay curve for the samples with the Argon/Nitrogen and Oxygen bubbled through them
  4. Draw what you think will happen to the decay curve as the viscosity changes.

Experimental: Part 2

  1. Degas the ethanol solution of [Ru(bpy)3]2+[Ru(bpy)3]2+ by purging it with a gentle steam of Ar(g)Ar(g) or N_2_(g). Use a cuvette with a septum. Purge the solution for 10 minutes.
  2. Acquire the luminescence decay curve for the degassed sample.
  3. Use a fresh aliquot of the 2.5μM2.5μM [Ru(bpy)3]2+[Ru(bpy)3]2+ in ethanol and using the same procedure given in Step 3, bubble molecular oxygen [O_2_(g)] through the solution. This will saturate the solution with molecular oxygen. Obtain the luminescence decay curve as before.
  4. Weigh out approximately 6 g of air-equilibrated [Ru(bpy)3]2+[Ru(bpy)3]2+ in glycerol solution.
    1. Dilute using 3 g of the [Ru(bpy)3]2+[Ru(bpy)3]2+ in ethanol solution for a total mass of roughly 9 g. This will result in 66% by weight glycerol solution. Carefully, homogenize (i.e. mix) the solution. Try not to sire in any air bubbles. Place an aliquot in a clean cuvette and acquire the luminescence decay curve.
  5. Weigh out approximately 9 g of the solution made in Step 6 (an air-equilibrated [Ru(bpy)3]2+[Ru(bpy)3]2+ in glycerol solution). Weight our approximately 3 g of the air-equilibrated [Ru(bpy)3]2+[Ru(bpy)3]2+ in glycerol solution
    1. Dilute it once again by adding 5 g of the [Ru(bpy)3]2+[Ru(bpy)3]2+ in ethanol solution (total mass now roughly 10 g. Dilute it by adding 6 g of the [Ru(bpy)3]2+[Ru(bpy)3]2+ in ethanol solution. This will result in 33% by weight glycerol solution. Carefully, homogenize the solution. Place an aliquot in a clean cuvette and acquire the luminescence decay curve.

Calculations: Part 2

  1. Use the same method of analysis and find the kobs and tobs for these samples.
  2. Make a Stern-Volmer plot of kobs versus [O2][O2] for the three [Ru(bpy)3]2+[Ru(bpy)3]2+ ethanol solutions and determine krkr and kqkq.
  1. For the viscosity study that used pure ethanol, pure glycerol and mixed ethanol/glycerol (66% and 33% by weight) and pure glycerol solutions, plot kobs versus viscosity. The viscosity of the 66% by weight glycerol solution is 16.8cP16.8cP and the viscosity of the 33% by weight glycerol solution is 2.75cP2.75cP.
In [46]:
Viscosity_Table = AvgTableOfConstants.exclude(0,1).with_column(
    'Viscosity (cP)', [1.18,2.76, 16.8,141.2])

Viscosity_Table
Out[46]:
Data Name [M*]o k_obs Lifetime (ns) offset chi-squared Viscosity (cP)
ethanol 0.120561 0.00018347 5463.77 -0.115035 2.24973e-05 1.18
glycerol 33 0.00855063 0.0106697 95.4028 -0.00246922 4.65755e-06 2.76
glycerol 66 0.121419 5.38192e-05 18596.4 -0.117168 2.94707e-05 16.8
glycerol 0.031489 0.000729278 1372.03 -0.0112891 3.80923e-05 141.2
In [47]:
Viscosity_Table.select(2,6).scatter(1)
plt.title('Viscosity vs k_obs')
plt.ylim(-0.005, 0.015)
Out[47]:
(-0.005, 0.015)
  1. Calculate kdiffkdiff for each of the solutions used in the viscosity study.
In [48]:
Viscosity_Table
Out[48]:
Data Name [M*]o k_obs Lifetime (ns) offset chi-squared Viscosity (cP)
ethanol 0.120561 0.00018347 5463.77 -0.115035 2.24973e-05 1.18
glycerol 33 0.00855063 0.0106697 95.4028 -0.00246922 4.65755e-06 2.76
glycerol 66 0.121419 5.38192e-05 18596.4 -0.117168 2.94707e-05 16.8
glycerol 0.031489 0.000729278 1372.03 -0.0112891 3.80923e-05 141.2
In [49]:
def calculate_K_dff(viscosity):
    temperature = 300 #300 kelvin -> room temp
    gas_constant = 8.314472 # 8.314472 × m2 kg s-2 K-1 mol-1
    
    k_diff = (8 * temperature * gas_constant)/(3000 * viscosity)
    return k_diff

k_diff_column = []
for row in range(Viscosity_Table.num_rows):
    k_diff_column.append(calculate_K_dff(Viscosity_Table.column(
    'Viscosity (cP)')[row]))

Viscosity_Table.with_column('k_diff (M^-1 S^-1)', k_diff_column).select(
'Data Name', 'Viscosity (cP)', 'k_diff (M^-1 S^-1)')
Out[49]:
Data Name Viscosity (cP) k_diff (M^-1 S^-1)
ethanol 1.18 5.63693
glycerol 33 2.76 2.40999
glycerol 66 16.8 0.395927
glycerol 141.2 0.0471075