Ignition delays (heptane)

In [1]:
import os
import cantera as ct
import numpy as np
%matplotlib inline
from matplotlib import pyplot as plt
import re
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 = 'heptane.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/heptane.original.cti
In [3]:
# Find the fuel
for species in original.species():
    if species.composition == {'C':7, 'H':16}:
        print (species.name)
NC7H16
In [4]:
def get_ignition_delay(model, temperature, pressure=10, phi=1.0, plot=False):
    """
    Get the ignition delay at temperature (K) and pressure (bar) and equivalence ratio (phi),
    for n-heptane.  Oxidizer/bath is 20% O2 and 80% Nitrogen.
    """

    fuel = 'NC7H16'
    model.set_equivalence_ratio(phi, fuel, 'O2:1.0, N2:4.0')
    model.TP = temperature, pressure*1e5
    reactor=ct.IdealGasReactor(model)
    reactor_network=ct.ReactorNet([reactor])
    time=0.0
    end_time=5.0 # second
    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}".format(temperature,pressure,ignition_time_ms, fuel))
        return ignition_time_ms
    else:
        print("At {0} K {1} bar, no ignition is detected for {2}" .format(temperature, pressure, fuel))
        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, 600, 10, plot=True)
reached end time 5231.0805 ms in 5863 steps 
At 600 K 10 bar, ignition delay time is 117.32848264 ms for NC7H16
Out[5]:
117.32848264042423
In [6]:
temperatures=1./np.linspace(1./600,1./2000,15)
pressures = [1,50]

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_pressure = dict()
    for pressure_atm in pressures:
        ignition_delay_times = np.zeros_like(temperatures)
        for i,T in enumerate(temperatures):
            P_bar = pressure_atm * 1.01325
            ignition_delay_times[i] = get_ignition_delay(original, T, P_bar, phi=phi)
        original_idt_by_pressure[pressure_atm] = ignition_delay_times
    return original_idt_by_pressure

original_idt_by_pressure = get_original_delays(phi=1.0)
reached end time 5068.2825 ms in 6107 steps 
At 600.0 K 1.01325 bar, ignition delay time is 161.079385264 ms for NC7H16
reached end time 5036.5933 ms in 6272 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 84.6763915128 ms for NC7H16
reached end time 5046.1227 ms in 5998 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 88.7484673007 ms for NC7H16
reached end time 5019.2220 ms in 5484 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 161.530846409 ms for NC7H16
reached end time 5060.4040 ms in 5249 steps 
At 750.0 K 1.01325 bar, ignition delay time is 386.137430479 ms for NC7H16
reached end time 5019.9988 ms in 4709 steps 
At 800.0 K 1.01325 bar, ignition delay time is 746.738145556 ms for NC7H16
reached end time 5026.2379 ms in 4573 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 464.197937657 ms for NC7H16
reached end time 5043.5512 ms in 4347 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 142.311848555 ms for NC7H16
reached end time 5044.5886 ms in 3747 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 37.4170638217 ms for NC7H16
reached end time 5111.8795 ms in 3563 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.13933724929 ms for NC7H16
reached end time 5030.9648 ms in 3418 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.9386700252 ms for NC7H16
reached end time 5024.4781 ms in 3170 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.38455443196 ms for NC7H16
reached end time 5126.0524 ms in 3174 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0741796709075 ms for NC7H16
reached end time 5111.9527 ms in 3072 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0149708162852 ms for NC7H16
reached end time 5405.2413 ms in 2861 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00415937045171 ms for NC7H16
reached end time 5119.3814 ms in 5857 steps 
At 600.0 K 50.6625 bar, ignition delay time is 111.076465313 ms for NC7H16
reached end time 5668.3398 ms in 5386 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 32.848461147 ms for NC7H16
reached end time 5864.6208 ms in 5176 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 10.340849443 ms for NC7H16
reached end time 5267.0300 ms in 5043 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.51070486382 ms for NC7H16
reached end time 5325.4722 ms in 4718 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.32893795707 ms for NC7H16
reached end time 5173.0736 ms in 4512 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.61286971588 ms for NC7H16
reached end time 5383.1714 ms in 4342 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.424748606008 ms for NC7H16
reached end time 5091.8312 ms in 3911 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.513256935995 ms for NC7H16
reached end time 5299.9052 ms in 3735 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.473083230219 ms for NC7H16
reached end time 5377.3161 ms in 3532 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.19037968591 ms for NC7H16
reached end time 5137.0848 ms in 3329 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0625112428688 ms for NC7H16
reached end time 5669.4205 ms in 3063 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0198322094996 ms for NC7H16
reached end time 5212.5055 ms in 2927 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00523211508327 ms for NC7H16
reached end time 5034.6590 ms in 2811 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00123230120014 ms for NC7H16
reached end time 5260.8336 ms in 2531 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000260237168686 ms for NC7H16
In [7]:
plt.figure(figsize=(6,5))
for pressure, color in zip(pressures, 'rb'):
    plt.semilogy(1000./temperatures, original_idt_by_pressure[pressure],'o-'+color, label='{0} atm'.format(pressure))
plt.legend(loc='best')
plt.xlabel("1000K / temperature")
plt.ylabel("Ignition delay time (ms)")
plt.ylim()
plt.show()

This is figure 8 from Curran, H. J.; Gaffuri, P.; Pitz, W. J.; Westbrook, C. K. A Comprehensive Modeling Study of n-Heptane Oxidation. Combust. Flame 1998, 114 (1-2), 149–177 DOI: 10.1016/S0010-2180(97)00282-4.

In [8]:
def get_roaming_delays(alpha=0.1, 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,'heptane.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,'heptane.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_pressure = dict()
    for pressure in pressures:
        ignition_delay_times = np.zeros_like(temperatures)
        for i,T in enumerate(temperatures):
            P_bar = pressure * 1.01325
            ignition_delay_times[i] = get_ignition_delay(roaming, T, P_bar, phi=phi)
        roaming_idt_by_pressure[pressure] = ignition_delay_times

    return roaming_idt_by_pressure
In [9]:
#temp_file_path = os.path.join(cantera_files_directory,'heptane.temporary.cti')
#roaming = ct.Solution(temp_file_path)
#get_ignition_delay(roaming, 1000/.85,10, plot=True)
In [10]:
# Check there is absolutely no change when ALPHA=0
roaming00_idt_by_pressure = get_roaming_delays(alpha=0)
ALPHA = 0.000000


**** 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
reached end time 5038.2137 ms in 6256 steps 
At 600.0 K 1.01325 bar, ignition delay time is 161.085166502 ms for NC7H16
reached end time 5041.2669 ms in 6069 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 84.6741568142 ms for NC7H16
reached end time 5062.0141 ms in 6117 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 88.748121007 ms for NC7H16
reached end time 5055.3587 ms in 5814 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 161.531076705 ms for NC7H16
reached end time 5010.3643 ms in 5310 steps 
At 750.0 K 1.01325 bar, ignition delay time is 386.137404606 ms for NC7H16
reached end time 5027.3718 ms in 4633 steps 
At 800.0 K 1.01325 bar, ignition delay time is 746.738207248 ms for NC7H16
reached end time 5056.8829 ms in 4592 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 464.197942832 ms for NC7H16
reached end time 5071.7568 ms in 4253 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 142.311842031 ms for NC7H16
reached end time 5013.0131 ms in 3972 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 37.4170536562 ms for NC7H16
reached end time 5055.2261 ms in 3528 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.13933167749 ms for NC7H16
reached end time 5051.5946 ms in 3556 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.93867526691 ms for NC7H16
reached end time 5030.1002 ms in 3168 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.384553705508 ms for NC7H16
reached end time 5107.8720 ms in 3192 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0741817161234 ms for NC7H16
reached end time 5180.8264 ms in 3235 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0149724654449 ms for NC7H16
reached end time 5032.9706 ms in 3049 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00415832100082 ms for NC7H16
reached end time 5244.1927 ms in 5828 steps 
At 600.0 K 50.6625 bar, ignition delay time is 111.058856952 ms for NC7H16
reached end time 5290.3806 ms in 5201 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 32.8478126024 ms for NC7H16
reached end time 5068.7754 ms in 5111 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 10.3408437089 ms for NC7H16
reached end time 5144.6771 ms in 5025 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.51070220198 ms for NC7H16
reached end time 5164.6050 ms in 4689 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.32893779157 ms for NC7H16
reached end time 6039.3353 ms in 4527 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.612865511989 ms for NC7H16
reached end time 5507.0630 ms in 4079 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.424748734942 ms for NC7H16
reached end time 5158.4468 ms in 3956 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.513256888406 ms for NC7H16
reached end time 5114.6540 ms in 3517 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.473083267197 ms for NC7H16
reached end time 5486.4614 ms in 3378 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.190379817513 ms for NC7H16
reached end time 5213.9898 ms in 3295 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0625112544171 ms for NC7H16
reached end time 5284.8994 ms in 3126 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0198323026341 ms for NC7H16
reached end time 5298.3829 ms in 3021 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00523200223591 ms for NC7H16
reached end time 5063.1411 ms in 2912 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00123245330143 ms for NC7H16
reached end time 5012.4149 ms in 2651 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000260185132065 ms for NC7H16
In [11]:
def plot_comparison(temperatures, original_idt_by_pressure, roaming_idt_by_pressure):
    
    print "For temperatures of {!s} K".format(temperatures)
    for pressure in pressures:
        change = (roaming_idt_by_pressure[pressure]-original_idt_by_pressure[pressure])/original_idt_by_pressure[pressure]
        print "At {!s} atm there's a {!s} percent change in IDT".format(pressure,  change*100)
        

    from matplotlib import gridspec
    plt.figure(figsize=(5,5))
    gs = gridspec.GridSpec(2, 1,height_ratios=[2, 1])

    colors, markers = 'rb', '^o'
    
    ax0 = plt.subplot(gs[0])
    for pressure, color, marker in zip(pressures, colors, markers):
        plt.semilogy(1000./temperatures,
                     original_idt_by_pressure[pressure],
                     color=color,
                     marker=marker,
                     linestyle='-',
                     label='{0} atm'.format(pressure)
                    )
        plt.semilogy(1000./temperatures, 
                     roaming_idt_by_pressure[pressure],
                     color=color,
                     marker=None,
                     linestyle=':',
                     label=None)
    plt.legend(loc='best', frameon=False)
    plt.xlabel("1000K / temperature")
    plt.ylabel("Ignition delay time(ms)")
    plt.ylim(1e-4,2000)

    ax1 = plt.subplot(gs[1])
    max_change = 0
    for pressure, color, marker in zip(pressures, colors, markers):
        changes = (roaming_idt_by_pressure[pressure]-original_idt_by_pressure[pressure]) / original_idt_by_pressure[pressure]
        ax1.plot(1000./temperatures, 
                 100.*changes, 
                 color=color,
                 linestyle=':',
                 marker=None,
                )
        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 <= 12:
        plt.ylim(-0.2,12)
        plt.yticks([0,5,10])
    plt.tight_layout()

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

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

(should be identical)

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [  3.58906128e-03  -2.63910460e-03  -3.90196820e-04   1.42570908e-04
  -6.70056506e-06   8.26145843e-06   1.11477183e-06  -4.58421423e-06
  -2.71678681e-05  -6.09649938e-05   2.70376502e-04  -1.88907550e-04
   2.75711105e-03   1.10158303e-02  -2.52310032e-02] percent change in IDT
At 50 atm there's a [ -1.58524681e-02  -1.97435308e-03  -5.54509661e-05  -7.58206693e-05
  -1.24534334e-05  -6.85935531e-04   3.03554340e-05  -9.27195547e-06
   7.81627253e-06   6.91265565e-05   1.84739018e-05   4.69612493e-04
  -2.15682099e-03   1.23428657e-02  -1.99958452e-02] percent change in IDT
In [12]:
# See how much change when ALPHA = 0.1 (reasonable upper limit)
roaming10_idt_by_pressure = get_roaming_delays(alpha=0.1)
ALPHA = 0.100000


**** 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
reached end time 5040.2629 ms in 6571 steps 
At 600.0 K 1.01325 bar, ignition delay time is 162.804653523 ms for NC7H16
reached end time 5038.9375 ms in 6350 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 87.6784775311 ms for NC7H16
reached end time 5024.3240 ms in 6075 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 95.030202637 ms for NC7H16
reached end time 5000.2043 ms in 5941 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 176.472756818 ms for NC7H16
reached end time 5025.2430 ms in 5505 steps 
At 750.0 K 1.01325 bar, ignition delay time is 418.255241246 ms for NC7H16
reached end time 5049.7661 ms in 4908 steps 
At 800.0 K 1.01325 bar, ignition delay time is 776.974595168 ms for NC7H16
reached end time 5003.5354 ms in 4624 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 475.747337253 ms for NC7H16
reached end time 5058.2175 ms in 4296 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 144.738853469 ms for NC7H16
reached end time 5062.5720 ms in 4115 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 37.8964092591 ms for NC7H16
reached end time 5069.0817 ms in 3825 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.31170458689 ms for NC7H16
reached end time 5037.7156 ms in 3559 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.99161994766 ms for NC7H16
reached end time 5073.7012 ms in 3262 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.397159051529 ms for NC7H16
reached end time 5106.9284 ms in 3283 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0770954880085 ms for NC7H16
reached end time 5158.3423 ms in 3278 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0155809201703 ms for NC7H16
reached end time 5242.1575 ms in 3094 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00428368760472 ms for NC7H16
reached end time 5711.6892 ms in 5892 steps 
At 600.0 K 50.6625 bar, ignition delay time is 111.951417078 ms for NC7H16
reached end time 5001.7061 ms in 5771 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 33.0878655037 ms for NC7H16
reached end time 5470.5882 ms in 5743 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 10.4191950169 ms for NC7H16
reached end time 5752.8999 ms in 5371 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.54327911507 ms for NC7H16
reached end time 5243.3129 ms in 5183 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.34822945969 ms for NC7H16
reached end time 5150.0556 ms in 4804 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.630549753248 ms for NC7H16
reached end time 5342.1983 ms in 4625 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.44846133495 ms for NC7H16
reached end time 5225.4293 ms in 4139 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.549134600556 ms for NC7H16
reached end time 5160.6144 ms in 3848 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.49724670067 ms for NC7H16
reached end time 5009.3019 ms in 3722 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.196044714456 ms for NC7H16
reached end time 5490.9639 ms in 3358 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0632981614777 ms for NC7H16
reached end time 5931.6537 ms in 3216 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0200908859563 ms for NC7H16
reached end time 5090.3659 ms in 3100 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00533639869484 ms for NC7H16
reached end time 5203.8029 ms in 3090 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00126271608435 ms for NC7H16
reached end time 5187.9329 ms in 2896 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000267177395108 ms for NC7H16
In [13]:
# Redo with alpha=0.1 but phi = 0.5
original_idt_by_pressure_phi05 = get_original_delays(phi=0.5)
roaming10_idt_by_pressure_phi05 = get_roaming_delays(alpha=0.1, phi=0.5)
reached end time 5157.2558 ms in 5933 steps 
At 600.0 K 1.01325 bar, ignition delay time is 249.398462862 ms for NC7H16
reached end time 5016.3558 ms in 5512 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 204.950061197 ms for NC7H16
reached end time 5088.9867 ms in 5381 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 268.258329101 ms for NC7H16
reached end time 5112.3472 ms in 5263 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 438.943035098 ms for NC7H16
reached end time 5045.5675 ms in 4883 steps 
At 750.0 K 1.01325 bar, ignition delay time is 768.488041976 ms for NC7H16
reached end time 5091.9150 ms in 4463 steps 
At 800.0 K 1.01325 bar, ignition delay time is 1303.00122529 ms for NC7H16
reached end time 5133.4684 ms in 4204 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 719.800116658 ms for NC7H16
reached end time 5183.9726 ms in 3947 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 202.369905931 ms for NC7H16
reached end time 5138.5678 ms in 3763 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 48.1109497258 ms for NC7H16
reached end time 5133.1130 ms in 3333 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.58396842648 ms for NC7H16
reached end time 5009.0943 ms in 3055 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.57507736795 ms for NC7H16
reached end time 5232.1851 ms in 2817 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.258652768856 ms for NC7H16
reached end time 5136.7349 ms in 2961 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0444605603808 ms for NC7H16
reached end time 5266.3361 ms in 2825 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.009503251015 ms for NC7H16
reached end time 5391.8390 ms in 2493 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00323624496499 ms for NC7H16
reached end time 5212.4993 ms in 4926 steps 
At 600.0 K 50.6625 bar, ignition delay time is 120.542865021 ms for NC7H16
reached end time 5943.4351 ms in 4988 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 35.7830678061 ms for NC7H16
reached end time 5430.4637 ms in 4640 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 11.4405663812 ms for NC7H16
reached end time 7536.3070 ms in 4485 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 4.05952099311 ms for NC7H16
reached end time 6790.6664 ms in 4238 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.70952078784 ms for NC7H16
reached end time 5578.7120 ms in 4007 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.962221201308 ms for NC7H16
reached end time 6220.7259 ms in 4065 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.811266575921 ms for NC7H16
reached end time 5086.7260 ms in 3601 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 1.00094956717 ms for NC7H16
reached end time 5440.0134 ms in 3449 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.820788889942 ms for NC7H16
reached end time 5285.0801 ms in 3255 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.30115842498 ms for NC7H16
reached end time 5484.7104 ms in 2847 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0920934812502 ms for NC7H16
reached end time 6241.9439 ms in 2721 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0259284593611 ms for NC7H16
reached end time 5630.0895 ms in 2604 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00608709183209 ms for NC7H16
reached end time 6820.3120 ms in 2465 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00124513091188 ms for NC7H16
reached end time 6411.4869 ms in 2532 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000226495629051 ms for NC7H16
ALPHA = 0.100000


**** 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
reached end time 5175.2275 ms in 5803 steps 
At 600.0 K 1.01325 bar, ignition delay time is 264.217188107 ms for NC7H16
reached end time 5145.6900 ms in 5493 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 224.067633166 ms for NC7H16
reached end time 5284.8495 ms in 5291 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 296.024741615 ms for NC7H16
reached end time 5267.4914 ms in 5174 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 482.363798731 ms for NC7H16
reached end time 5054.2425 ms in 4769 steps 
At 750.0 K 1.01325 bar, ignition delay time is 829.514237811 ms for NC7H16
reached end time 5155.5778 ms in 4352 steps 
At 800.0 K 1.01325 bar, ignition delay time is 1354.32573179 ms for NC7H16
reached end time 5151.4765 ms in 4110 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 737.262215562 ms for NC7H16
reached end time 5037.7010 ms in 3868 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 206.091697185 ms for NC7H16
reached end time 5039.1997 ms in 3609 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 48.9038482718 ms for NC7H16
reached end time 5054.9064 ms in 3264 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.80838821587 ms for NC7H16
reached end time 5074.5400 ms in 3123 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.61960485618 ms for NC7H16
reached end time 5027.6774 ms in 3135 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.266677451788 ms for NC7H16
reached end time 5099.0986 ms in 2824 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0460654896219 ms for NC7H16
reached end time 5043.6560 ms in 2960 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.00983476761476 ms for NC7H16
reached end time 5097.0755 ms in 2916 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00332901148358 ms for NC7H16
reached end time 5032.7413 ms in 4902 steps 
At 600.0 K 50.6625 bar, ignition delay time is 121.243237992 ms for NC7H16
reached end time 5027.9491 ms in 4867 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 36.0222317451 ms for NC7H16
reached end time 5031.4126 ms in 4738 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 11.5525785748 ms for NC7H16
reached end time 5035.8282 ms in 4527 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 4.12991676234 ms for NC7H16
reached end time 5013.3963 ms in 4254 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.76467084501 ms for NC7H16
reached end time 5042.3819 ms in 4040 steps 
At 800.0 K 50.6625 bar, ignition delay time is 1.01336242288 ms for NC7H16
reached end time 5032.6329 ms in 3937 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.864384067316 ms for NC7H16
reached end time 5033.3259 ms in 3573 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 1.06257133969 ms for NC7H16
reached end time 5024.7725 ms in 3458 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.856828951523 ms for NC7H16
reached end time 5042.3199 ms in 3291 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.309724099807 ms for NC7H16
reached end time 5050.2369 ms in 3194 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.093502872584 ms for NC7H16
reached end time 5135.8627 ms in 2740 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0263026489921 ms for NC7H16
reached end time 5107.4032 ms in 3076 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00619374917684 ms for NC7H16
reached end time 5032.6718 ms in 2688 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00127178760116 ms for NC7H16
reached end time 5131.9255 ms in 2662 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.00023219348547 ms for NC7H16
In [14]:
# Redo with alpha=0.1 but phi = 2.0
original_idt_by_pressure_phi20 = get_original_delays(phi=2.0)
roaming10_idt_by_pressure_phi20 = get_roaming_delays(alpha=0.1, phi=2.0)
reached end time 10558.0964 ms in 6094 steps 
At 600.0 K 1.01325 bar, ignition delay time is 147.441534911 ms for NC7H16
reached end time 5929.0842 ms in 5965 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 65.1300604458 ms for NC7H16
reached end time 7425.5010 ms in 5761 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 53.1555425415 ms for NC7H16
reached end time 7576.6246 ms in 5407 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 86.9298549868 ms for NC7H16
reached end time 5864.4419 ms in 5208 steps 
At 750.0 K 1.01325 bar, ignition delay time is 222.106481317 ms for NC7H16
reached end time 6776.9061 ms in 4925 steps 
At 800.0 K 1.01325 bar, ignition delay time is 431.755750364 ms for NC7H16
reached end time 6519.3896 ms in 4231 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 298.976018082 ms for NC7H16
reached end time 5205.8826 ms in 3971 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 101.387046936 ms for NC7H16
reached end time 6075.6379 ms in 3715 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 29.4307745769 ms for NC7H16
reached end time 5457.6487 ms in 3462 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 8.58130650017 ms for NC7H16
reached end time 6023.4576 ms in 3539 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 2.36616636314 ms for NC7H16
reached end time 6077.2251 ms in 3213 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.604261275086 ms for NC7H16
reached end time 5546.2648 ms in 3154 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.138810345158 ms for NC7H16
reached end time 5079.0685 ms in 3299 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0288977546558 ms for NC7H16
reached end time 5442.7083 ms in 3292 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.0065857370274 ms for NC7H16
reached end time 5105.5101 ms in 5846 steps 
At 600.0 K 50.6625 bar, ignition delay time is 101.686686864 ms for NC7H16
reached end time 6817.3804 ms in 5449 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 29.9655024419 ms for NC7H16
reached end time 7432.2134 ms in 5354 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 9.38790455736 ms for NC7H16
reached end time 5117.1522 ms in 5045 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.15070904016 ms for NC7H16
reached end time 5711.6004 ms in 4766 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.15712105768 ms for NC7H16
reached end time 5277.5132 ms in 4538 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.491591688642 ms for NC7H16
reached end time 5873.7686 ms in 4224 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.282931656531 ms for NC7H16
reached end time 5551.9191 ms in 3993 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.278097855578 ms for NC7H16
reached end time 5283.9303 ms in 3577 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.271780291484 ms for NC7H16
reached end time 5099.7317 ms in 3366 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.1276824223 ms for NC7H16
reached end time 5071.2097 ms in 3201 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0483884265038 ms for NC7H16
reached end time 5052.9748 ms in 3133 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0181117548003 ms for NC7H16
reached end time 5079.3024 ms in 2988 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00555398098331 ms for NC7H16
reached end time 5006.4011 ms in 3168 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00145729482976 ms for NC7H16
reached end time 5055.0593 ms in 2857 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000330651954648 ms for NC7H16
ALPHA = 0.100000


**** 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
reached end time 5049.5747 ms in 6203 steps 
At 600.0 K 1.01325 bar, ignition delay time is 147.928979656 ms for NC7H16
reached end time 5012.7959 ms in 5923 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 66.0766623118 ms for NC7H16
reached end time 5000.2362 ms in 5661 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 55.5220368284 ms for NC7H16
reached end time 5036.3599 ms in 5521 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 93.8481178805 ms for NC7H16
reached end time 5000.8759 ms in 5199 steps 
At 750.0 K 1.01325 bar, ignition delay time is 240.066636601 ms for NC7H16
reached end time 5126.0293 ms in 4767 steps 
At 800.0 K 1.01325 bar, ignition delay time is 449.457044456 ms for NC7H16
reached end time 5033.6144 ms in 4645 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 306.741250722 ms for NC7H16
reached end time 5099.8046 ms in 4349 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 102.974674856 ms for NC7H16
reached end time 5037.7440 ms in 3888 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 29.6760255063 ms for NC7H16
reached end time 5224.9506 ms in 3811 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 8.67828854826 ms for NC7H16
reached end time 5062.3617 ms in 3549 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 2.41470229733 ms for NC7H16
reached end time 5027.5468 ms in 3446 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.62049481842 ms for NC7H16
reached end time 5101.9056 ms in 3581 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.143548640559 ms for NC7H16
reached end time 5102.2083 ms in 3507 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0300227918824 ms for NC7H16
reached end time 5064.2468 ms in 3562 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00681253602051 ms for NC7H16
reached end time 5010.7416 ms in 6143 steps 
At 600.0 K 50.6625 bar, ignition delay time is 102.930778573 ms for NC7H16
reached end time 5041.8486 ms in 5954 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 30.3047410668 ms for NC7H16
reached end time 5014.1252 ms in 5878 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 9.49175649038 ms for NC7H16
reached end time 5023.4570 ms in 5669 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.18729696957 ms for NC7H16
reached end time 5012.9874 ms in 5328 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.17323854167 ms for NC7H16
reached end time 5033.8126 ms in 5010 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.502014973632 ms for NC7H16
reached end time 5049.8787 ms in 4590 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.295164578955 ms for NC7H16
reached end time 5009.3128 ms in 4255 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.298336442067 ms for NC7H16
reached end time 5045.9941 ms in 4065 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.28798886628 ms for NC7H16
reached end time 5019.8922 ms in 3765 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.131496733117 ms for NC7H16
reached end time 5049.0375 ms in 3732 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0487515752798 ms for NC7H16
reached end time 5023.4725 ms in 3402 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.018268097373 ms for NC7H16
reached end time 5148.3437 ms in 3501 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00565629239435 ms for NC7H16
reached end time 5075.5036 ms in 3382 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00149326736789 ms for NC7H16
reached end time 5099.5380 ms in 3282 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000339729277304 ms for NC7H16
In [15]:
mprint("## Difference between reference cases for $\phi=1 (-)$  and $\phi=0.5 (\cdots)$ ")
plot_comparison(temperatures, original_idt_by_pressure, original_idt_by_pressure_phi05)

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

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [  54.8295348   142.0392007   202.26812615  171.73945092   99.01930798
   74.4923884    55.06318712   42.20172669   28.58023803    4.86502648
  -18.75474694  -32.73962088  -40.06368613  -36.52149065  -22.19387519] percent change in IDT
At 50 atm there's a [  8.52241713   8.93377211  10.63468668  15.63264787  28.63811879
  57.00256945  90.99923212  95.01919935  73.49777745  58.18831906
  47.32306866  30.73913606  16.34093928   1.04111817 -12.96568811] percent change in IDT
In [16]:
mprint("## 10% roaming with $\phi = 0.5$")
plot_comparison(temperatures, original_idt_by_pressure_phi05, roaming10_idt_by_pressure_phi05)
plt.savefig('ignition-heptane-10pc-phi05.pdf')

10% roaming with $\phi = 0.5$

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [  5.94178692   9.32791718  10.35062457   9.89211815   7.94107293
   3.93894537   2.425965     1.83910312   1.64806255   2.34161654
   2.82700324   3.10249257   3.60978185   3.48845463   2.8664863 ] percent change in IDT
At 50 atm there's a [ 0.5810157   0.66837181  0.97907909  1.73409053  3.22605361  5.31491319
  6.54747687  6.1563314   4.39090514  2.84424214  1.53039207  1.44316184
  1.75218886  2.14087443  2.51565844] percent change in IDT
In [17]:
mprint("## 10% roaming with $\phi = 1$")
plot_comparison(temperatures, original_idt_by_pressure, roaming10_idt_by_pressure)
plt.savefig('ignition-heptane-10pc.pdf')

10% roaming with $\phi = 1$

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [ 1.07106707  3.54536367  7.07813388  9.25019013  8.31771495  4.04913688
  2.48803337  1.7054131   1.28108779  1.88599384  2.73124987  3.27772053
  3.93074958  4.07528804  2.98884541] percent change in IDT
At 50 atm there's a [ 0.7877022   0.72881453  0.7576319   0.92785502  1.4516481   2.8847954
  5.58276793  6.99019576  5.10765736  2.9756476   1.25884333  1.30432495
  1.99314445  2.46813719  2.66688516] percent change in IDT
In [18]:
mprint("## 10% roaming with $\phi = 2$")
plot_comparison(temperatures, original_idt_by_pressure_phi20, roaming10_idt_by_pressure_phi20)
plt.savefig('ignition-heptane-10pc-phi20.pdf')

10% roaming with $\phi = 2$

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [ 0.33060206  1.45340241  4.45201793  7.95844292  8.08628149  4.0998398
  2.59727609  1.56590804  0.83331456  1.13015481  2.05124775  2.68651062
  3.41350308  3.89316485  3.44379061] percent change in IDT
At 50 atm there's a [ 1.22345584  1.13209724  1.10623124  1.16126018  1.39289523  2.12031351
  4.32363157  7.27750541  5.96385216  2.98734215  0.75048685  0.86321052
  1.8421275   2.46844615  2.7452802 ] percent change in IDT
In [19]:
# See how much change when ALPHA = 0.05 (moderate?)
roaming05_idt_by_pressure = get_roaming_delays(alpha=0.05)
ALPHA = 0.050000


**** 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
reached end time 5030.1277 ms in 6529 steps 
At 600.0 K 1.01325 bar, ignition delay time is 161.923194316 ms for NC7H16
reached end time 5040.8248 ms in 6427 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 86.1370547894 ms for NC7H16
reached end time 5018.0748 ms in 5836 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 91.8007981314 ms for NC7H16
reached end time 5024.9425 ms in 5696 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 168.791706164 ms for NC7H16
reached end time 5006.2874 ms in 4986 steps 
At 750.0 K 1.01325 bar, ignition delay time is 401.892146932 ms for NC7H16
reached end time 5017.2085 ms in 4916 steps 
At 800.0 K 1.01325 bar, ignition delay time is 761.763258399 ms for NC7H16
reached end time 5091.5402 ms in 4478 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 469.928861812 ms for NC7H16
reached end time 5020.0020 ms in 4222 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 143.509732268 ms for NC7H16
reached end time 5052.9232 ms in 4094 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 37.6515729626 ms for NC7H16
reached end time 5090.6168 ms in 3683 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 9.22295141998 ms for NC7H16
reached end time 5110.0417 ms in 3426 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 1.96415287427 ms for NC7H16
reached end time 5123.1052 ms in 3271 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.390603980463 ms for NC7H16
reached end time 5101.8567 ms in 3421 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0755787101129 ms for NC7H16
reached end time 5083.5766 ms in 3266 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0152646751951 ms for NC7H16
reached end time 5093.3316 ms in 3035 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00421813238519 ms for NC7H16
reached end time 5360.5001 ms in 5958 steps 
At 600.0 K 50.6625 bar, ignition delay time is 111.492314568 ms for NC7H16
reached end time 5138.5561 ms in 5735 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 32.9661518822 ms for NC7H16
reached end time 5404.9290 ms in 5470 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 10.3796040462 ms for NC7H16
reached end time 5002.5891 ms in 5133 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.5268032823 ms for NC7H16
reached end time 5236.8595 ms in 5175 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.33829942484 ms for NC7H16
reached end time 5933.6830 ms in 4988 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.621401474045 ms for NC7H16
reached end time 5429.9578 ms in 4527 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.436212694682 ms for NC7H16
reached end time 5287.4320 ms in 4039 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.530810290626 ms for NC7H16
reached end time 5150.1987 ms in 3804 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.485009266571 ms for NC7H16
reached end time 5410.8117 ms in 3532 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.193167494741 ms for NC7H16
reached end time 5309.8819 ms in 3256 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0628941187303 ms for NC7H16
reached end time 5463.5481 ms in 3484 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0199571377991 ms for NC7H16
reached end time 5056.7279 ms in 3138 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00528246216727 ms for NC7H16
reached end time 5139.7806 ms in 2886 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.0012470696525 ms for NC7H16
reached end time 5008.0243 ms in 2857 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000263591738778 ms for NC7H16
In [20]:
# See how much change when ALPHA = 0.5 (excessive)
roaming50_idt_by_pressure = get_roaming_delays(alpha=0.5)
ALPHA = 0.500000


**** 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
reached end time 5013.2655 ms in 6876 steps 
At 600.0 K 1.01325 bar, ignition delay time is 171.417201454 ms for NC7H16
reached end time 5055.8904 ms in 6384 steps 
At 631.578947368 K 1.01325 bar, ignition delay time is 103.267860857 ms for NC7H16
reached end time 5057.3603 ms in 6278 steps 
At 666.666666667 K 1.01325 bar, ignition delay time is 128.788362074 ms for NC7H16
reached end time 5023.5054 ms in 5726 steps 
At 705.882352941 K 1.01325 bar, ignition delay time is 256.533958671 ms for NC7H16
reached end time 5051.0376 ms in 5564 steps 
At 750.0 K 1.01325 bar, ignition delay time is 572.928764767 ms for NC7H16
reached end time 5040.7745 ms in 4977 steps 
At 800.0 K 1.01325 bar, ignition delay time is 905.606779954 ms for NC7H16
reached end time 5046.9054 ms in 4721 steps 
At 857.142857143 K 1.01325 bar, ignition delay time is 526.333905484 ms for NC7H16
reached end time 5012.9085 ms in 4374 steps 
At 923.076923077 K 1.01325 bar, ignition delay time is 156.154694117 ms for NC7H16
reached end time 5034.5717 ms in 3959 steps 
At 1000.0 K 1.01325 bar, ignition delay time is 40.3898844399 ms for NC7H16
reached end time 5102.5582 ms in 3947 steps 
At 1090.90909091 K 1.01325 bar, ignition delay time is 10.2937393457 ms for NC7H16
reached end time 5050.1146 ms in 3645 steps 
At 1200.0 K 1.01325 bar, ignition delay time is 2.32721807473 ms for NC7H16
reached end time 5057.9336 ms in 3475 steps 
At 1333.33333333 K 1.01325 bar, ignition delay time is 0.480561334843 ms for NC7H16
reached end time 5152.2708 ms in 3389 steps 
At 1500.0 K 1.01325 bar, ignition delay time is 0.0963236396941 ms for NC7H16
reached end time 5053.8897 ms in 3389 steps 
At 1714.28571429 K 1.01325 bar, ignition delay time is 0.0196448667218 ms for NC7H16
reached end time 5092.1804 ms in 3025 steps 
At 2000.0 K 1.01325 bar, ignition delay time is 0.00517952384938 ms for NC7H16
reached end time 6291.7519 ms in 5881 steps 
At 600.0 K 50.6625 bar, ignition delay time is 115.67652974 ms for NC7H16
reached end time 5262.4232 ms in 5737 steps 
At 631.578947368 K 50.6625 bar, ignition delay time is 34.1381326282 ms for NC7H16
reached end time 5142.1333 ms in 5740 steps 
At 666.666666667 K 50.6625 bar, ignition delay time is 10.7796002726 ms for NC7H16
reached end time 5031.5554 ms in 5255 steps 
At 705.882352941 K 50.6625 bar, ignition delay time is 3.70673799206 ms for NC7H16
reached end time 6010.2092 ms in 5203 steps 
At 750.0 K 50.6625 bar, ignition delay time is 1.45455770045 ms for NC7H16
reached end time 5163.7922 ms in 5128 steps 
At 800.0 K 50.6625 bar, ignition delay time is 0.733521486431 ms for NC7H16
reached end time 5166.6481 ms in 4591 steps 
At 857.142857143 K 50.6625 bar, ignition delay time is 0.581663558073 ms for NC7H16
reached end time 5176.4430 ms in 4259 steps 
At 923.076923077 K 50.6625 bar, ignition delay time is 0.725978245372 ms for NC7H16
reached end time 5755.3550 ms in 4097 steps 
At 1000.0 K 50.6625 bar, ignition delay time is 0.60815606817 ms for NC7H16
reached end time 5310.4923 ms in 3820 steps 
At 1090.90909091 K 50.6625 bar, ignition delay time is 0.223395754889 ms for NC7H16
reached end time 5025.1214 ms in 3375 steps 
At 1200.0 K 50.6625 bar, ignition delay time is 0.0676988267852 ms for NC7H16
reached end time 5211.5799 ms in 3295 steps 
At 1333.33333333 K 50.6625 bar, ignition delay time is 0.0216384417122 ms for NC7H16
reached end time 5179.2711 ms in 3085 steps 
At 1500.0 K 50.6625 bar, ignition delay time is 0.00597136889271 ms for NC7H16
reached end time 5057.5034 ms in 3023 steps 
At 1714.28571429 K 50.6625 bar, ignition delay time is 0.00144659711546 ms for NC7H16
reached end time 5016.0479 ms in 2829 steps 
At 2000.0 K 50.6625 bar, ignition delay time is 0.000309709821964 ms for NC7H16
In [21]:
mprint("## 5% roaming ($\phi=1$)")
plot_comparison(temperatures, original_idt_by_pressure, roaming05_idt_by_pressure)
plt.savefig('ignition-heptane-05pc.pdf')

5% roaming ($\phi=1$)

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [ 0.5238467   1.72499471  3.4393054   4.49502984  4.0800801   2.01209928
  1.2345863   0.84173154  0.62674384  0.91488221  1.31445005  1.57313192
  1.88601431  1.96287834  1.41276028] percent change in IDT
At 50 atm there's a [ 0.37438107  0.35828386  0.37477195  0.45855232  0.70443227  1.39209981
  2.69902915  3.41999365  2.52091716  1.46434154  0.6124912   0.62992628
  0.96227019  1.19844502  1.28904342] percent change in IDT
In [22]:
mprint("## 50% roaming ($\phi=1$)")
plot_comparison(temperatures, original_idt_by_pressure, roaming50_idt_by_pressure)
plt.savefig('ignition-heptane-50pc.pdf')

50% roaming ($\phi=1$)

For temperatures of [  600.           631.57894737   666.66666667   705.88235294   750.           800.
   857.14285714   923.07692308  1000.          1090.90909091  1200.
  1333.33333333  1500.          1714.28571429  2000.        ] K
At 1 atm there's a [  6.41783936  21.9559065   45.11615354  58.81422303  48.37431431
  21.27501258  13.38566219   9.7271209    7.94509327  12.63113577
  20.04198984  24.96575124  29.85180241  31.22107938  24.52662992] percent change in IDT
At 50 atm there's a [  4.14134931   3.9261245    4.24288964   5.58386808   9.45264169
  19.68636521  36.94301755  41.44538426  28.55160135  17.34222263
   8.29864146   9.10756924  14.12915805  17.38989748  19.01060234] percent change in IDT
In [ ]: