Ignition delays (butanol)

In [1]:
import os
import cantera as ct
import numpy as np
%matplotlib inline
from matplotlib import pyplot as plt
import re
import IPython
from IPython.display import display, Markdown, HTML
def mprint(s):
    "A convenience to format things in Jupyter notebooks via MarkDown syntax"
    display(Markdown(s))
In [2]:
cantera_file_name = 'butanol.original.cti'
cantera_files_directory = 'CanteraFiles'
cantera_file_path = os.path.join(cantera_files_directory,cantera_file_name)
print os.path.abspath(cantera_file_path)
assert os.path.exists(cantera_file_path)
original = ct.Solution(cantera_file_path)
/Users/rwest/Dropbox (CoMoChEng)/Northeastern/Papers/2017-05 Roaming/Roaming/CanteraFiles/butanol.original.cti


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
In [3]:
# Find the fuel
for species in original.species():
    if species.composition == {'C':4, 'H':10, 'O':1}:
        print (species.name)
nc4h9oh
sc4h9oh
tc4h9oh
ic4h9oh
In [4]:
def get_ignition_delay(model, temperature, pressure=10, phi=1.0, plot=False, isomer='n'):
    """
    Get the ignition delay at temperature (K) and pressure (bar) and stochiometry (phi),
    for the butanol isomer (n,s,t,i)
    """
    assert isomer in ['n','s','t','i'], "Expecting isomer n,s,t, or i not {}".format(isomer)
    oxygen_mole = 1.0
    argon_mole = 96./4.*oxygen_mole # 4% O2 in Ar
    butanol_mole = phi * oxygen_mole/6.
    X_string = isomer + 'c4h9oh:{0}, o2:{1}, ar:{2}'.format(butanol_mole, oxygen_mole, argon_mole)
    model.TPX = temperature, pressure*1e5, X_string
    reactor=ct.IdealGasReactor(model)
    reactor_network=ct.ReactorNet([reactor])
    time=0.0
    end_time=25e-3
    times=[]
    concentrations=[]
    pressures=[]
    temperatures=[]
    print_data = True
    while time < end_time:
        time=reactor_network.time
        times.append(time)
        temperatures.append(reactor.T)
        pressures.append(reactor.thermo.P)
        concentrations.append(reactor.thermo.concentrations)
        reactor_network.step()
    print("reached end time {0:.4f} ms in {1} steps ". format(times[-1]*1e3, len(times)))
    concentrations = np.array(concentrations)
    times = np.array(times)
    pressures = np.array(pressures)
    temperatures = np.array(temperatures)
    
    dTdt = (temperatures[1:] - temperatures[:-1]) / (times[1:] - times[:-1])
    
    if plot:
        plt.subplot(2,1,1)
        plt.plot(times,temperatures)
        plt.subplot(2,1,2)
        plt.plot(times[1:], dTdt)
        plt.show()
        
    step_with_fastest_T_rise = dTdt.argmax()
    if step_with_fastest_T_rise > 1 and step_with_fastest_T_rise < len(times)-2:
        ignition_time_ms = 1e3 * times[step_with_fastest_T_rise]
        print("At {0} K {1} bar, ignition delay time is {2} ms for {3}-butanol".format(temperature,pressure,ignition_time_ms,isomer))
        return ignition_time_ms
    else:
        print("At {0} K {1} bar, no ignition is detected for {2}-butanol" .format(temperature, pressure, isomer))
        return np.infty

    """
    # For excited OH emission
    i_ch=gas.species_index('ch')
    i_o2=gas.species_index('o2')
    excited_oh_generation=concentrations[:,i_o2] * concentrations[:,i_ch]
    step_with_highest_oh_gen = excited_oh_generation.argmax()
    if step_with_highest_oh_gen > 1 and excited_oh_generation.max() > 1e-20:
        ignition_time_ms = 1e3 * times[step_with_highest_oh_gen]
        print("At {0} K {1} bar, ignition delay time is {2} ms".format(temperature,pressure,ignition_time_ms))
        return ignition_time_ms
    else:
        print("At {0} K {1} bar, no ignition is detected" .format(temperature, pressure))
        return np.infty
    """
In [5]:
get_ignition_delay(original, 1000/.85,43.56, plot=True, isomer='t')
reached end time 59.0089 ms in 2903 steps 
At 1176.47058824 K 43.56 bar, ignition delay time is 1.51235668923 ms for t-butanol
Out[5]:
1.512356689230099
In [6]:
temperatures=1./np.linspace(1./1000,1./1400,8)

def get_original_delays(phi=1.0):
    """
    Get the ignition delay times, sorted by pressure then temperature,
    for the requested phi, using the original model.
    """
    original_idt_by_isomer = dict()
    for isomer in 'tnis':
        ignition_delay_times = np.zeros_like(temperatures)
        for i,T in enumerate(temperatures):
            P = 43 * 1.01325
            ignition_delay_times[i] = get_ignition_delay(original, T, P, isomer=isomer, phi=phi)
        original_idt_by_isomer[isomer] = ignition_delay_times
    return original_idt_by_isomer
    
original_idt_by_isomer = get_original_delays(phi=1.0)
reached end time 27.0217 ms in 3526 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 10.3324315856 ms for t-butanol
reached end time 30.6242 ms in 3332 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 7.08681051826 ms for t-butanol
reached end time 42.1767 ms in 3215 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 4.37474310594 ms for t-butanol
reached end time 60.8213 ms in 3013 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.40476709861 ms for t-butanol
reached end time 37.4627 ms in 2957 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.19007629504 ms for t-butanol
reached end time 27.8835 ms in 2896 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.53982816553 ms for t-butanol
reached end time 34.1767 ms in 2835 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.23263329951 ms for t-butanol
reached end time 57.3801 ms in 2644 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0987491779325 ms for t-butanol
reached end time 29.4132 ms in 3143 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.70538395406 ms for n-butanol
reached end time 52.1410 ms in 3063 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.48150133267 ms for n-butanol
reached end time 39.8836 ms in 2992 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.807389650314 ms for n-butanol
reached end time 35.8589 ms in 2917 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.439654293479 ms for n-butanol
reached end time 55.2968 ms in 2838 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.235381659366 ms for n-butanol
reached end time 25.3516 ms in 2574 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.121952454157 ms for n-butanol
reached end time 43.3753 ms in 2719 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0613098811619 ms for n-butanol
reached end time 163.3978 ms in 2483 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0304506302477 ms for n-butanol
reached end time 31.8951 ms in 3360 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.99715278682 ms for i-butanol
reached end time 25.9664 ms in 3218 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.66831401631 ms for i-butanol
reached end time 36.6829 ms in 3152 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.01405391959 ms for i-butanol
reached end time 36.8139 ms in 2869 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.667950725569 ms for i-butanol
reached end time 41.3413 ms in 2879 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.419902571737 ms for i-butanol
reached end time 25.1152 ms in 2918 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.223723622025 ms for i-butanol
reached end time 67.0002 ms in 2595 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.105174533085 ms for i-butanol
reached end time 121.2321 ms in 2570 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0479420709926 ms for i-butanol
reached end time 28.4311 ms in 3230 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.78491361109 ms for s-butanol
reached end time 25.3481 ms in 2916 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 2.17926857572 ms for s-butanol
reached end time 69.0522 ms in 2780 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.26425288893 ms for s-butanol
reached end time 35.1409 ms in 2889 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.744346158055 ms for s-butanol
reached end time 29.3760 ms in 2780 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.429120852069 ms for s-butanol
reached end time 45.6701 ms in 2823 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.226194907278 ms for s-butanol
reached end time 193.1769 ms in 2632 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.106561849946 ms for s-butanol
reached end time 30.8457 ms in 2612 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0469072026028 ms for s-butanol
In [7]:
plt.figure(figsize=(6,5))
for isomer, color in zip('tnis', 'mgbr'):
    plt.semilogy(1000./temperatures, original_idt_by_isomer[isomer],'o-'+color, label='{0}-butanol'.format(isomer))
plt.legend(loc='best')
plt.xlabel("1000K / temperature")
plt.ylabel("Ignition delay time (ms)")
plt.ylim(1e-2,10)
plt.show()

Compare that with Sarathy et al's Figure 27b and it looks pretty good (especially now that I'm using Ar not N2 bath). They were a bit vague about what pressure they ran at, saying "near 43 atm" and "The initial pressure was varied according to the average pressure of the measurements, thereby better representing the actual conditions of the experiments". Makes it hard to reproduce exactly. Probably the pressures reported in the figure legend, rather than 43 atm as used here. (Also reports "CHEMKIN PRO using constant volume homogeneous batch reactor simulations at $\phi$ = 1"). Anyway, good enough to be confident we're using the model correctly.

In [8]:
def get_roaming_delays(alpha=0.1, P_atm=43, phi=1.0):
    """
    For the given alpha, and phi, find the new ignition delay times
    and return them for comparison to the previously calculated
    ones.
    """
    cantera_file_path = os.path.join(cantera_files_directory,'butanol.roaming.cti')
    assert os.path.exists(cantera_file_path)
    cti_def = open(cantera_file_path).read()
    cti_def, substitutions =  re.subn('ALPHA = [0-9.]+', 'ALPHA = {0:f}'.format(alpha), cti_def)
    assert substitutions == 1
    for line in cti_def.splitlines():
        if line.startswith('ALPHA'): print line
    # Write to temporary file and read from disk, see https://github.com/Cantera/cantera/issues/416
    temp_file_path = os.path.join(cantera_files_directory,'butanol.temporary.cti')
    with open(temp_file_path,'w') as output_file:
        output_file.write(cti_def)
    roaming = ct.Solution(temp_file_path)
    roaming_idt_by_isomer = dict()
    for isomer in 'tnis':
        ignition_delay_times = np.zeros_like(temperatures)
        for i,T in enumerate(temperatures):
            P_bar = P_atm * 1.01325
            ignition_delay_times[i] = get_ignition_delay(roaming, T, P_bar, isomer=isomer, phi=phi)
        roaming_idt_by_isomer[isomer] = ignition_delay_times

    return roaming_idt_by_isomer
In [9]:
# Check there is absolutely no change when ALPHA=0
roaming_idt_by_isomer = roaming00_idt_by_isomer = get_roaming_delays(alpha=0.0)
ALPHA = 0.000000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 25.1373 ms in 3321 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 10.3324293577 ms for t-butanol
reached end time 69.4039 ms in 3181 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 7.08680935334 ms for t-butanol
reached end time 34.9045 ms in 3157 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 4.37474314877 ms for t-butanol
reached end time 26.6367 ms in 3090 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.40476954512 ms for t-butanol
reached end time 195.6346 ms in 2993 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.19007440292 ms for t-butanol
reached end time 35.8173 ms in 2757 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.539826799145 ms for t-butanol
reached end time 64.6934 ms in 2665 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.232630193134 ms for t-butanol
reached end time 133.7022 ms in 2624 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0987511057217 ms for t-butanol
reached end time 42.7034 ms in 3155 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.70538162551 ms for n-butanol
reached end time 32.6903 ms in 2965 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.48150644059 ms for n-butanol
reached end time 26.5944 ms in 2820 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.807398118225 ms for n-butanol
reached end time 65.5536 ms in 2882 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.439654000302 ms for n-butanol
reached end time 25.9199 ms in 2882 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.235380925115 ms for n-butanol
reached end time 25.7024 ms in 2823 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.121952544547 ms for n-butanol
reached end time 51.9592 ms in 2562 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0613069901046 ms for n-butanol
reached end time 28.6588 ms in 2484 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0304526083516 ms for n-butanol
reached end time 28.0383 ms in 3411 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.99714914194 ms for i-butanol
reached end time 55.0082 ms in 3126 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.66831522142 ms for i-butanol
reached end time 54.9955 ms in 2939 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.0140499583 ms for i-butanol
reached end time 25.5628 ms in 3068 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.667953876401 ms for i-butanol
reached end time 89.6500 ms in 2939 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.419907834816 ms for i-butanol
reached end time 60.3680 ms in 2870 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.223724042424 ms for i-butanol
reached end time 25.5065 ms in 2507 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.105173534297 ms for i-butanol
reached end time 118.5775 ms in 2550 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0479428107813 ms for i-butanol
reached end time 25.1791 ms in 3328 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.78490285493 ms for s-butanol
reached end time 29.5798 ms in 2976 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 2.1792654509 ms for s-butanol
reached end time 31.5228 ms in 3074 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.26424376505 ms for s-butanol
reached end time 43.8450 ms in 2902 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.744349502149 ms for s-butanol
reached end time 35.3139 ms in 2866 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.429118483464 ms for s-butanol
reached end time 31.2863 ms in 2614 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.226194560857 ms for s-butanol
reached end time 45.3824 ms in 2876 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.106559299578 ms for s-butanol
reached end time 89.6492 ms in 2499 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0469074089049 ms for s-butanol
In [10]:
def plot_both(temperatures, original_idt_by_isomer, roaming_idt_by_isomer):
    plt.figure(figsize=(6,6))
    for isomer, color in zip('tnis', 'mgbr'):
        plt.semilogy(1000./temperatures, original_idt_by_isomer[isomer],'o-'+color, label='{0}-butanol'.format(isomer))
        plt.semilogy(1000./temperatures, roaming_idt_by_isomer[isomer],'o:'+color, label=None)

    plt.legend(loc='best')
    plt.xlabel("1000K / temperature")
    plt.ylabel("Ignition delay time(ms)")
    plt.ylim(1e-2,)
    plt.show()
    
plot_both(temperatures, original_idt_by_isomer, roaming_idt_by_isomer)
In [11]:
def plot_comparison(temperatures, original_idt_by_isomer, roaming_idt_by_isomer):
    print "For temperatures of {!s} K".format(temperatures)
    for isomer in 'tnis':
        change = (roaming_idt_by_isomer[isomer]-original_idt_by_isomer[isomer])/original_idt_by_isomer[isomer]
        print "For {!s}-butanol there's a {!s} percent change in IDT".format(isomer,  change*100)
        
    from matplotlib import gridspec
    plt.figure(figsize=(5,5))
    gs = gridspec.GridSpec(2, 1,height_ratios=[2, 1])

    isomers, colors, markers = 'tsin', 'krbg', 'o^sv'

    ax0 = plt.subplot(gs[0])
    for isomer, color, marker in zip(isomers, colors, markers):
        plt.semilogy(1000./temperatures,
                     original_idt_by_isomer[isomer],
                     marker=marker,
                     color=color,
                     linestyle='-',
                     label='{0}-butanol'.format(isomer),
                    )
        plt.semilogy(1000./temperatures, 
                     roaming_idt_by_isomer[isomer],
                     marker=None,
                     color=color,
                     linestyle=':',
                     label=None,
                    )
    plt.legend(loc='best', frameon=False)
    plt.xlabel("1000K / Temperature")
    plt.ylabel("Ignition delay time (ms)")
    plt.ylim(0.01, 20)

    ax1 = plt.subplot(gs[1])
    max_change = 0
    for isomer, color, marker in zip(isomers, colors, markers):
        changes = (roaming_idt_by_isomer[isomer]-original_idt_by_isomer[isomer]) / original_idt_by_isomer[isomer]
        ax1.plot(1000./temperatures, 
                 100.*changes, 
                 linestyle=':',
                 marker=None,
                 color=color,
                 )
        max_change = max(max_change, max(changes*100))
    plt.ylabel("Change")
    plt.xlabel("Temperature")

    plt.xlim(ax0.get_xlim())

    from matplotlib.ticker import FuncFormatter
    def reciprocal(x, pos):
        'The two args are the value and tick position'
        return '{0:.0f}K'.format(1000./x)
    def percentage(x, pos):
        'The two args are the value and tick position'
        return '{0:g}%'.format(x)
    formatter = FuncFormatter(reciprocal)
    ax1.xaxis.set_major_formatter(formatter)
    ax1.yaxis.set_major_formatter(FuncFormatter(percentage))
    ax1.spines["top"].set_visible(False)
    ax1.spines["right"].set_visible(False)
    ax1.spines["bottom"].set_visible(False)
    plt.axhline(y=0, color='k', linewidth=1)
    if max_change <= 8:
        plt.ylim(-1,8)
        plt.yticks([0,4,8])
    plt.tight_layout()

mprint("## Original model ($-$) vs 0% roaming ($\cdots$)\n(should be identical)")
plot_comparison(temperatures, original_idt_by_isomer, roaming00_idt_by_isomer)
plt.savefig('ignition-butanol-00pc.pdf')

Original model ($-$) vs 0% roaming ($\cdots$)

(should be identical)

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ -2.15621647e-05  -1.64379532e-05   9.78867430e-07   1.01735848e-04
  -1.58991555e-04  -2.53114810e-04  -1.33530993e-03   1.95220786e-03] percent change in IDT
For n-butanol there's a [ -8.60711138e-05   3.44779568e-04   1.04880097e-03  -6.66835810e-05
  -3.11940244e-04   7.41191157e-05  -4.71548348e-03   6.49610181e-03] percent change in IDT
For i-butanol there's a [ -1.21611313e-04   7.22356580e-05  -3.90638514e-04   4.71716259e-04
   1.25340491e-03   1.87910221e-04  -9.49647600e-04   1.54308873e-03] percent change in IDT
For s-butanol there's a [-0.00028419 -0.00014339 -0.00072168  0.00044927 -0.00055197 -0.00015315
 -0.00239332  0.00043981] percent change in IDT
In [12]:
# See how much change when ALPHA = 0.1 (reasonable upper limit)
roaming10_idt_by_isomer = get_roaming_delays(alpha=0.10)
ALPHA = 0.100000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 26.1321 ms in 3440 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 10.8072622613 ms for t-butanol
reached end time 25.5434 ms in 3006 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 7.35032520568 ms for t-butanol
reached end time 27.8209 ms in 3034 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 4.51914166298 ms for t-butanol
reached end time 25.0716 ms in 3002 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.49080874007 ms for t-butanol
reached end time 26.7893 ms in 2927 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.24252576173 ms for t-butanol
reached end time 25.4646 ms in 2817 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.569208955201 ms for t-butanol
reached end time 25.9351 ms in 2702 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.247535293787 ms for t-butanol
reached end time 25.6027 ms in 2699 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.105812393468 ms for t-butanol
reached end time 27.1732 ms in 3129 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.72311414836 ms for n-butanol
reached end time 26.9101 ms in 2881 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.48674160895 ms for n-butanol
reached end time 26.1152 ms in 2961 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.807841725883 ms for n-butanol
reached end time 25.6670 ms in 2933 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.439113301043 ms for n-butanol
reached end time 26.3738 ms in 2653 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.235289138427 ms for n-butanol
reached end time 25.3132 ms in 2687 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.122388056384 ms for n-butanol
reached end time 26.1711 ms in 2631 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0619003884497 ms for n-butanol
reached end time 25.6216 ms in 2445 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0309493300032 ms for n-butanol
reached end time 25.7104 ms in 3404 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.01777296801 ms for i-butanol
reached end time 27.3437 ms in 2896 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.68055629059 ms for i-butanol
reached end time 28.6933 ms in 3136 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.0218014831 ms for i-butanol
reached end time 25.2797 ms in 2834 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.674528113036 ms for i-butanol
reached end time 25.9211 ms in 2913 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.426578016273 ms for i-butanol
reached end time 25.5763 ms in 2800 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.228732098078 ms for i-butanol
reached end time 25.1552 ms in 2630 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.107833963716 ms for i-butanol
reached end time 25.6895 ms in 2539 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0491430324378 ms for i-butanol
reached end time 27.4931 ms in 3156 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.80994475046 ms for s-butanol
reached end time 27.0465 ms in 3045 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 2.18957408504 ms for s-butanol
reached end time 26.1422 ms in 3139 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.26938704893 ms for s-butanol
reached end time 26.1134 ms in 2795 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.748584866859 ms for s-butanol
reached end time 25.4956 ms in 2900 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.433890852702 ms for s-butanol
reached end time 26.1307 ms in 2870 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.230387836762 ms for s-butanol
reached end time 25.6488 ms in 2645 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.109031013782 ms for s-butanol
reached end time 25.7300 ms in 2510 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0480264128467 ms for s-butanol
In [13]:
# Redo with alpha=0.1 but phi = 0.5
original_idt_by_isomer_phi05 = get_original_delays(phi=0.5)
roaming10_idt_by_isomer_phi05 = get_roaming_delays(alpha=0.1, phi=0.5)
reached end time 25.1534 ms in 2827 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 17.8580839845 ms for t-butanol
reached end time 25.3606 ms in 2510 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 10.5516692252 ms for t-butanol
reached end time 26.0259 ms in 2496 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 5.77341916711 ms for t-butanol
reached end time 25.4081 ms in 2462 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.93967741212 ms for t-butanol
reached end time 26.7358 ms in 2404 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.38397236293 ms for t-butanol
reached end time 26.0015 ms in 2344 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.616716018832 ms for t-butanol
reached end time 27.1151 ms in 2384 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.259521145117 ms for t-butanol
reached end time 79.8176 ms in 2364 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.105139905788 ms for t-butanol
reached end time 25.2218 ms in 2656 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 4.42828947319 ms for n-butanol
reached end time 25.6398 ms in 2316 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 3.0054201532 ms for n-butanol
reached end time 26.3419 ms in 2357 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.5344637201 ms for n-butanol
reached end time 25.3419 ms in 2232 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.765397655064 ms for n-butanol
reached end time 25.0994 ms in 2220 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.353839531197 ms for n-butanol
reached end time 25.6550 ms in 2253 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.164836473911 ms for n-butanol
reached end time 31.4415 ms in 2100 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0741295207197 ms for n-butanol
reached end time 31.8849 ms in 2340 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0330090862749 ms for n-butanol
reached end time 25.4986 ms in 2473 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 4.84448540421 ms for i-butanol
reached end time 26.0399 ms in 2225 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 3.28764558894 ms for i-butanol
reached end time 26.7811 ms in 2315 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.86430331868 ms for i-butanol
reached end time 25.3252 ms in 2330 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 1.11327824181 ms for i-butanol
reached end time 25.0888 ms in 2200 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.616088588504 ms for i-butanol
reached end time 25.7488 ms in 2251 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.300947311676 ms for i-butanol
reached end time 35.1040 ms in 2224 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.130450526444 ms for i-butanol
reached end time 35.1078 ms in 2216 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0544895007328 ms for i-butanol
reached end time 25.2318 ms in 2474 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 8.41046453919 ms for s-butanol
reached end time 25.4301 ms in 2280 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 4.65365047801 ms for s-butanol
reached end time 26.5445 ms in 2159 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 2.52480335188 ms for s-butanol
reached end time 25.9623 ms in 2183 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 1.34198947307 ms for s-butanol
reached end time 25.1007 ms in 2229 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.659703835748 ms for s-butanol
reached end time 30.4955 ms in 2330 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.30439670903 ms for s-butanol
reached end time 28.2380 ms in 2270 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.126099659988 ms for s-butanol
reached end time 32.4401 ms in 2165 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0490863822858 ms for s-butanol
ALPHA = 0.100000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 25.0052 ms in 2659 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 18.4822969892 ms for t-butanol
reached end time 25.4876 ms in 2431 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 10.8571870815 ms for t-butanol
reached end time 25.9810 ms in 2411 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 5.92672463799 ms for t-butanol
reached end time 25.0996 ms in 2386 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 3.02450672348 ms for t-butanol
reached end time 28.9597 ms in 2342 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.4332619086 ms for t-butanol
reached end time 27.8096 ms in 2328 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.644070161003 ms for t-butanol
reached end time 25.5152 ms in 2301 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.273377598696 ms for t-butanol
reached end time 30.5351 ms in 2279 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.111611424467 ms for t-butanol
reached end time 25.5125 ms in 2681 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 4.45559561752 ms for n-butanol
reached end time 26.5730 ms in 2342 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 3.01660636103 ms for n-butanol
reached end time 26.1870 ms in 2223 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.53815652715 ms for n-butanol
reached end time 25.8628 ms in 2265 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.767143618621 ms for n-butanol
reached end time 25.0639 ms in 2356 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.355317664565 ms for n-butanol
reached end time 27.3252 ms in 2236 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.166134874211 ms for n-butanol
reached end time 26.9746 ms in 2228 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.075062313012 ms for n-butanol
reached end time 30.5995 ms in 2112 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0335995083561 ms for n-butanol
reached end time 26.9889 ms in 2622 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 4.87545026708 ms for i-butanol
reached end time 25.7539 ms in 2308 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 3.30787128798 ms for i-butanol
reached end time 25.0310 ms in 2207 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.87768297347 ms for i-butanol
reached end time 26.0727 ms in 2298 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 1.12361777363 ms for i-butanol
reached end time 26.5118 ms in 2418 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.625061081183 ms for i-butanol
reached end time 28.7693 ms in 2343 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.306960640278 ms for i-butanol
reached end time 25.2699 ms in 2171 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.133350096689 ms for i-butanol
reached end time 27.6353 ms in 2187 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0557185456671 ms for i-butanol
reached end time 25.8358 ms in 2420 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 8.4613870157 ms for s-butanol
reached end time 26.0558 ms in 2210 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 4.67707240708 ms for s-butanol
reached end time 25.7043 ms in 2191 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 2.53793370283 ms for s-butanol
reached end time 25.2347 ms in 2220 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 1.35181434922 ms for s-butanol
reached end time 25.9524 ms in 2223 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.667776725017 ms for s-butanol
reached end time 25.7033 ms in 2338 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.309871600621 ms for s-butanol
reached end time 29.1877 ms in 2103 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.128765971637 ms for s-butanol
reached end time 25.6970 ms in 2184 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0501221692301 ms for s-butanol
In [14]:
# Redo with alpha=0.1 but phi = 2.0
original_idt_by_isomer_phi20 = get_original_delays(phi=2.0)
roaming10_idt_by_isomer_phi20 = get_roaming_delays(alpha=0.1, phi=2.0)
reached end time 25.2107 ms in 3412 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 6.82705857933 ms for t-butanol
reached end time 25.0105 ms in 3579 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 5.27827541723 ms for t-butanol
reached end time 25.0786 ms in 3272 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 3.56674105917 ms for t-butanol
reached end time 25.0326 ms in 3255 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.0492534704 ms for t-butanol
reached end time 25.0476 ms in 3203 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.03163077434 ms for t-butanol
reached end time 25.7061 ms in 2953 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.476166141752 ms for t-butanol
reached end time 25.2426 ms in 2909 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.213512848813 ms for t-butanol
reached end time 29.9503 ms in 2591 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0976401166143 ms for t-butanol
reached end time 25.0662 ms in 3280 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 1.73402534515 ms for n-butanol
reached end time 25.1090 ms in 3586 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 0.974679952359 ms for n-butanol
reached end time 25.0800 ms in 3212 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.553406069392 ms for n-butanol
reached end time 25.0897 ms in 3201 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.32101708152 ms for n-butanol
reached end time 25.1054 ms in 3072 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.18704007158 ms for n-butanol
reached end time 25.6146 ms in 2813 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.107100447887 ms for n-butanol
reached end time 33.4717 ms in 2829 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0599489828872 ms for n-butanol
reached end time 28.2591 ms in 2638 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0331783724068 ms for n-butanol
reached end time 25.0661 ms in 3557 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 1.96801503479 ms for i-butanol
reached end time 25.0059 ms in 3419 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.11554060405 ms for i-butanol
reached end time 25.0289 ms in 3295 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.693171559074 ms for i-butanol
reached end time 25.1896 ms in 3386 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.46849085694 ms for i-butanol
reached end time 25.0996 ms in 3048 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.30880846048 ms for i-butanol
reached end time 25.6418 ms in 2987 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.178321304589 ms for i-butanol
reached end time 25.7637 ms in 2845 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0929537540743 ms for i-butanol
reached end time 54.4604 ms in 2662 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0476355909426 ms for i-butanol
reached end time 25.0694 ms in 3215 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.361538817 ms for s-butanol
reached end time 25.0129 ms in 3194 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.36977686002 ms for s-butanol
reached end time 25.0191 ms in 3323 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.814517455647 ms for s-butanol
reached end time 25.0384 ms in 3140 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.505623692332 ms for s-butanol
reached end time 25.2621 ms in 2937 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.317705978308 ms for s-butanol
reached end time 25.4922 ms in 2971 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.188199358577 ms for s-butanol
reached end time 27.6780 ms in 2619 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.101617366381 ms for s-butanol
reached end time 35.8443 ms in 2668 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0518266643758 ms for s-butanol
ALPHA = 0.100000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 25.0721 ms in 3463 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 7.18552319513 ms for t-butanol
reached end time 25.0639 ms in 3381 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 5.50583547541 ms for t-butanol
reached end time 25.0472 ms in 3221 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 3.70202463443 ms for t-butanol
reached end time 25.0562 ms in 3275 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.13408782499 ms for t-butanol
reached end time 25.1570 ms in 3103 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.0838150202 ms for t-butanol
reached end time 25.3589 ms in 3053 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.505375851106 ms for t-butanol
reached end time 26.3344 ms in 2821 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.228413519642 ms for t-butanol
reached end time 26.2685 ms in 2612 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.104883791968 ms for t-butanol
reached end time 25.1185 ms in 3420 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 1.74511736538 ms for n-butanol
reached end time 25.0508 ms in 3276 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 0.97689377102 ms for n-butanol
reached end time 25.1139 ms in 3114 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.552267338911 ms for n-butanol
reached end time 25.0722 ms in 2939 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.319405672484 ms for n-butanol
reached end time 25.1074 ms in 3124 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.186206187512 ms for n-butanol
reached end time 25.5396 ms in 2757 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.107068431987 ms for n-butanol
reached end time 25.5969 ms in 2789 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0603310311281 ms for n-butanol
reached end time 25.7770 ms in 2651 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0336249099023 ms for n-butanol
reached end time 25.0533 ms in 3633 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 1.98227183644 ms for i-butanol
reached end time 25.0834 ms in 3395 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.12399938095 ms for i-butanol
reached end time 25.0246 ms in 3446 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.698719450213 ms for i-butanol
reached end time 25.0078 ms in 3187 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.473252522403 ms for i-butanol
reached end time 25.1403 ms in 2994 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.313702548406 ms for i-butanol
reached end time 26.1140 ms in 2980 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.18234105304 ms for i-butanol
reached end time 27.5355 ms in 2912 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.095299982435 ms for i-butanol
reached end time 25.9939 ms in 2819 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0487883502694 ms for i-butanol
reached end time 25.0443 ms in 3439 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.37659593284 ms for s-butanol
reached end time 25.0337 ms in 3185 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.37503377796 ms for s-butanol
reached end time 25.0792 ms in 3083 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.816590379438 ms for s-butanol
reached end time 25.1205 ms in 3077 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.50741599212 ms for s-butanol
reached end time 25.0345 ms in 3147 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.320562771865 ms for s-butanol
reached end time 25.0824 ms in 3056 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.19136936735 ms for s-butanol
reached end time 25.2687 ms in 2617 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.103886033149 ms for s-butanol
reached end time 25.0335 ms in 2555 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0530408252347 ms for s-butanol
In [15]:
mprint("## Difference between reference cases for $\phi=1 (-)$  and $\phi=0.5 (\cdots)$ ")
plot_comparison(temperatures, original_idt_by_isomer, original_idt_by_isomer_phi05)

Difference between reference cases for $\phi=1 (-)$ and $\phi=0.5 (\cdots)$

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 72.83525022  48.89165158  31.97161587  22.24374717  16.29274263
  14.24302365  11.55803819   6.47167702] percent change in IDT
For n-butanol there's a [  63.68432534  102.86314207   90.05243868   74.09079507   50.32587167
   35.16454019   20.90958148    8.40198054] percent change in IDT
For i-butanol there's a [ 61.6362511   97.06395539  83.846567    66.67071375  46.72179452
  34.51745013  24.03242745  13.65696059] percent change in IDT
For s-butanol there's a [ 122.21021147  113.54185206   99.70714514   80.29104585   53.73381008
   34.57275086   18.33471364    4.6457251 ] percent change in IDT
In [16]:
mprint("## 10% roaming with $\phi = 0.5$")
plot_comparison(temperatures, original_idt_by_isomer_phi05, roaming10_idt_by_isomer_phi05)
plt.savefig('ignition-butanol-10pc-phi05.pdf')

10% roaming with $\phi = 0.5$

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 3.49540861  2.89544573  2.65536706  2.88566735  3.56145448  4.43545187
  5.33923876  6.15514978] percent change in IDT
For n-butanol there's a [ 0.61662962  0.37220113  0.24065783  0.22811196  0.41774116  0.78768993
  1.2583277   1.78866533] percent change in IDT
For i-butanol there's a [ 0.63917754  0.61520314  0.71767586  0.92874642  1.45636404  1.99813335
  2.22273556  2.25556285] percent change in IDT
For s-butanol there's a [ 0.60546568  0.50330228  0.5200544   0.73211276  1.22371416  1.79860407
  2.11444793  2.11013095] percent change in IDT
In [17]:
mprint("## 10% roaming with $\phi = 1$")
plot_comparison(temperatures, original_idt_by_isomer, roaming10_idt_by_isomer)
plt.savefig('ignition-butanol-10pc.pdf')

10% roaming with $\phi = 1$

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 4.59553661  3.71838201  3.30073226  3.57796152  4.40723565  5.44261888
  6.40578727  7.15268287] percent change in IDT
For n-butanol there's a [ 0.65536702  0.35371391  0.05599224 -0.12304951 -0.03930677  0.35719021
  0.9631519   1.63773213] percent change in IDT
For i-butanol there's a [ 0.68799233  0.73381115  0.76401889  0.98471148  1.58976034  2.23868897
  2.52858801  2.50502621] percent change in IDT
For s-butanol there's a [ 0.66133978  0.47288845  0.4061023   0.56945398  1.11157512  1.85367988
  2.31711803  2.38600936] percent change in IDT
In [18]:
mprint("## 10% roaming with $\phi = 2$")
plot_comparison(temperatures, original_idt_by_isomer_phi20, roaming10_idt_by_isomer_phi20)
plt.savefig('ignition-butanol-10pc-phi20.pdf')

10% roaming with $\phi = 2$

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 5.25064509  4.31125775  3.79291833  4.13976874  5.05842276  6.13435244
  6.97881692  7.41874918] percent change in IDT
For n-butanol there's a [ 0.63966886  0.22713288 -0.20576762 -0.50196987 -0.44583177 -0.02989334
  0.63728895  1.3458692 ] percent change in IDT
For i-butanol there's a [ 0.72442544  0.75826706  0.80036335  1.01638386  1.58482961  2.2542166
  2.52408134  2.41995387] percent change in IDT
For s-butanol there's a [ 0.63759764  0.38377915  0.25449716  0.35447306  0.89919415  1.68438872
  2.23255812  2.34273395] percent change in IDT
In [19]:
# See how much change when ALPHA = 0.05 (moderate?)
roaming05_idt_by_isomer = get_roaming_delays(alpha=0.05)
ALPHA = 0.050000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 27.2090 ms in 3603 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 10.5636621308 ms for t-butanol
reached end time 27.1326 ms in 3516 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 7.21529546783 ms for t-butanol
reached end time 26.2292 ms in 3090 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 4.44509552492 ms for t-butanol
reached end time 25.3364 ms in 3103 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.44661715462 ms for t-butanol
reached end time 26.2883 ms in 2892 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.21550193408 ms for t-butanol
reached end time 28.4633 ms in 2747 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.554009284315 ms for t-butanol
reached end time 27.1618 ms in 2820 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.239806908179 ms for t-butanol
reached end time 25.6237 ms in 2647 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.102138095892 ms for t-butanol
reached end time 28.2902 ms in 3140 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.71411526502 ms for n-butanol
reached end time 26.8169 ms in 2955 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.48404003614 ms for n-butanol
reached end time 28.0387 ms in 3148 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.807567899026 ms for n-butanol
reached end time 25.1908 ms in 2676 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.439354942446 ms for n-butanol
reached end time 26.7496 ms in 2656 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.235322239557 ms for n-butanol
reached end time 25.3443 ms in 2781 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.12216088545 ms for n-butanol
reached end time 26.1773 ms in 2411 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0615947284515 ms for n-butanol
reached end time 25.8094 ms in 2360 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0306941996536 ms for n-butanol
reached end time 32.4002 ms in 3172 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.00732401287 ms for i-butanol
reached end time 26.0024 ms in 3158 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.6743104174 ms for i-butanol
reached end time 29.8687 ms in 2948 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.01784465046 ms for i-butanol
reached end time 25.2727 ms in 3118 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.671181520282 ms for i-butanol
reached end time 27.6555 ms in 2872 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.42317465553 ms for i-butanol
reached end time 27.6922 ms in 2771 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.22616880447 ms for i-butanol
reached end time 25.8131 ms in 2713 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.106465695176 ms for i-butanol
reached end time 27.1284 ms in 2527 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0485265407367 ms for i-butanol
reached end time 25.1545 ms in 3265 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.79722912485 ms for s-butanol
reached end time 25.1093 ms in 2985 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 2.18430266328 ms for s-butanol
reached end time 25.2273 ms in 2995 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.2667435138 ms for s-butanol
reached end time 26.8859 ms in 2872 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.746416344676 ms for s-butanol
reached end time 26.5618 ms in 2754 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.431455674571 ms for s-butanol
reached end time 25.5643 ms in 2692 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.228240866317 ms for s-butanol
reached end time 25.3411 ms in 2792 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.107762772961 ms for s-butanol
reached end time 26.4989 ms in 2630 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.047450650843 ms for s-butanol
In [20]:
# See how much change when ALPHA = 0.5 (excessive)
roaming50_idt_by_isomer = get_roaming_delays(alpha=0.5)
ALPHA = 0.500000


**** WARNING ****
For species oh*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  53.6206
	Value computed using high-temperature polynomial: 53.5842


**** WARNING ****
For species ch3o2, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  11.5313
	Value computed using high-temperature polynomial: 11.5482


**** WARNING ****
For species ch*, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  107.505
	Value computed using high-temperature polynomial: 107.348


**** WARNING ****
For species c2h2oh, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  12.2546
	Value computed using high-temperature polynomial: 12.2718


**** WARNING ****
For species ch2co, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  10.0876
	Value computed using high-temperature polynomial: 10.1013


**** WARNING ****
For species c4h612, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  20.128
	Value computed using high-temperature polynomial: 20.1809


**** WARNING ****
For species ch3chchco, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch3chchco, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species ch2chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  15.6564
	Value computed using high-temperature polynomial: 16.4989


**** WARNING ****
For species ch2chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  54.1203
	Value computed using high-temperature polynomial: 56.1447


**** WARNING ****
For species c2h3choch2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  13.1975
	Value computed using high-temperature polynomial: 13.0095


**** WARNING ****
For species c2h3choch2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  55.5755
	Value computed using high-temperature polynomial: 53.053


**** WARNING ****
For species c4h5-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  47.6524
	Value computed using high-temperature polynomial: 48.4362


**** WARNING ****
For species c4h5-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  52.4292
	Value computed using high-temperature polynomial: 54.3208


**** WARNING ****
For species c4h6-2, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  28.0724
	Value computed using high-temperature polynomial: 28.6029


**** WARNING ****
For species c4h6-2, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  50.2514
	Value computed using high-temperature polynomial: 51.5152


**** WARNING ****
For species ch3chchcho, discontinuity in cp/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  22.4214
	Value computed using high-temperature polynomial: 22.3333


**** WARNING ****
For species ch3chchcho, discontinuity in h/RT detected at Tmid = 1000
	Value computed using low-temperature polynomial:  -0.875531
	Value computed using high-temperature polynomial: -0.7953


**** WARNING ****
For species ch3chchcho, discontinuity in s/R detected at Tmid = 1000
	Value computed using low-temperature polynomial:  59.1945
	Value computed using high-temperature polynomial: 62.4953
reached end time 25.9065 ms in 3566 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 13.3985874496 ms for t-butanol
reached end time 25.2966 ms in 3296 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 8.77087278216 ms for t-butanol
reached end time 26.2045 ms in 3358 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 5.30597367991 ms for t-butanol
reached end time 25.7415 ms in 3111 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 2.97065378242 ms for t-butanol
reached end time 25.3354 ms in 3112 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 1.54653064071 ms for t-butanol
reached end time 25.0685 ms in 2889 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.747701017033 ms for t-butanol
reached end time 25.0105 ms in 2775 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.341799536488 ms for t-butanol
reached end time 26.1004 ms in 2867 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.151604222845 ms for t-butanol
reached end time 25.9171 ms in 3105 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 2.80837921464 ms for n-butanol
reached end time 25.6209 ms in 2893 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.517581 ms for n-butanol
reached end time 25.2575 ms in 2883 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 0.815665233642 ms for n-butanol
reached end time 25.2729 ms in 2805 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.440348989318 ms for n-butanol
reached end time 25.6784 ms in 2696 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.236888884421 ms for n-butanol
reached end time 25.9495 ms in 2700 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.125467950204 ms for n-butanol
reached end time 25.0138 ms in 2524 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.0653113254441 ms for n-butanol
reached end time 25.9969 ms in 2601 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0337296911388 ms for n-butanol
reached end time 25.9791 ms in 3201 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.11498128914 ms for i-butanol
reached end time 26.1575 ms in 3201 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 1.74203527265 ms for i-butanol
reached end time 25.1137 ms in 3019 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.06215987098 ms for i-butanol
reached end time 26.1394 ms in 3008 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.708266757182 ms for i-butanol
reached end time 25.3886 ms in 2862 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.460694899803 ms for i-butanol
reached end time 25.8953 ms in 2698 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.255463838901 ms for i-butanol
reached end time 26.6807 ms in 2632 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.122493148904 ms for i-butanol
reached end time 25.1925 ms in 2655 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0558990373109 ms for i-butanol
reached end time 25.1163 ms in 3139 steps 
At 1000.0 K 43.56975 bar, ignition delay time is 3.93214614206 ms for s-butanol
reached end time 25.8877 ms in 2988 steps 
At 1042.55319149 K 43.56975 bar, ignition delay time is 2.24599334202 ms for s-butanol
reached end time 25.0406 ms in 2924 steps 
At 1088.88888889 K 43.56975 bar, ignition delay time is 1.29965544319 ms for s-butanol
reached end time 25.5903 ms in 2772 steps 
At 1139.53488372 K 43.56975 bar, ignition delay time is 0.77218874343 ms for s-butanol
reached end time 26.1494 ms in 2762 steps 
At 1195.12195122 K 43.56975 bar, ignition delay time is 0.458944876997 ms for s-butanol
reached end time 26.1094 ms in 2837 steps 
At 1256.41025641 K 43.56975 bar, ignition delay time is 0.252998496736 ms for s-butanol
reached end time 25.6405 ms in 2618 steps 
At 1324.32432432 K 43.56975 bar, ignition delay time is 0.12276000037 ms for s-butanol
reached end time 25.2307 ms in 2740 steps 
At 1400.0 K 43.56975 bar, ignition delay time is 0.0542659210414 ms for s-butanol
In [21]:
mprint("## 5% roaming ($\phi=1$)")
plot_comparison(temperatures, original_idt_by_isomer, roaming05_idt_by_isomer)
plt.savefig('ignition-butanol-05pc.pdf')

5% roaming ($\phi=1$)

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 2.23791025  1.81301517  1.60814972  1.7402956   2.13647135  2.62696904
  3.08365513  3.43184422] percent change in IDT
For n-butanol there's a [ 0.32273833  0.17136019  0.02207716 -0.06808782 -0.02524403  0.17091193
  0.46460258  0.79988297] percent change in IDT
For i-butanol there's a [ 0.33936295  0.3594288   0.37381946  0.48368758  0.77924833  1.09294782
  1.22763758  1.2191166 ] percent change in IDT
For s-butanol there's a [ 0.32538428  0.23099895  0.19700369  0.27812149  0.54409439  0.90451154
  1.12697275  1.15856033] percent change in IDT
In [22]:
mprint("## 50% roaming ($\phi=1$)")
plot_comparison(temperatures, original_idt_by_isomer, roaming50_idt_by_isomer)
plt.savefig('ignition-butanol-50pc.pdf')

50% roaming ($\phi=1$)

For temperatures of [ 1000.          1042.55319149  1088.88888889  1139.53488372  1195.12195122
  1256.41025641  1324.32432432  1400.        ] K
For t-butanol there's a [ 29.67506573  23.76333133  21.28652018  23.53187068  29.95222635
  38.50722596  46.92631588  53.52454169] percent change in IDT
For n-butanol there's a [  3.80704781   2.43534491   1.02498011   0.15800957   0.64033241
   2.88267757   6.52658953  10.76844999] percent change in IDT
For i-butanol there's a [  3.93134787   4.41890769   4.74392441   6.0357793    9.71471261
  14.18724433  16.4665488   16.59704338] percent change in IDT
For s-butanol there's a [  3.88998392   3.06179638   2.80027474   3.74054263   6.95002929
  11.84977583  15.2007031   15.68782198] percent change in IDT
In [ ]: