Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jet-fuels shock tube ignition data from 10.1016/j.fuel.2016.09.047 #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skyreflectedinmirrors
Copy link

@skyreflectedinmirrors skyreflectedinmirrors commented Feb 4, 2019

Add a ChemKED file for shock tube ignition data from:

"Ignition delay time correlations for distillate fuels"

https://www.sciencedirect.com/science/article/pii/S0016236116309048#s0065

The datapoints in this file were generated using this simple script:

from string import Template
import pandas as pd
import cantera as ct
import re

ct.suppress_thermo_warnings()

# create mapping of fuel names, models, and species names
nice_fuel_name = {
    'A1': 'JP-8',
    'A2': 'Jet A',
    'A3': 'JP-5'
}

model_name = {
    'A1': 'hychem_A1_highT.cti',
    'A2': 'hychem_A2_highT.cti',
    'A3': 'hychem_A3_highT.cti'
}

for name, model in model_name.items():
    model_name[name] = ct.Solution(model)

fuel_model_name = {
    'A1': 'POSF10264',
    'A2': 'POSF10325',
    'A3': 'POSF10289'
}


skeleton = Template("""
- composition:
    kind: mole fraction
    species:
      - InChI: no InChI
        amount: [${Xfuel}]
        species-name: ${fuel_name}
      - InChI: 1S/O2/c1-2
        amount: [${XO2}]
        species-name: O2
      - InChI: ${DChi}
        amount: [${XD}]
        species-name: ${Dilutant}
  equivalence-ratio: ${phi}
  ignition-type:
    target: OH*
    type: d/dt max
  ignition-delay:
    - ${tau} us
    - uncertainty-type: relative
      uncertainty: 0.15
  pressure:
    - ${pressure} atm
    - uncertainty-type: relative
      uncertainty: 0.01
  temperature:
    - ${temperature} K
    - uncertainty-type: relative
      uncertainty: 0.01
""".strip())


# get argon data -- skip empty rows
ar = pd.read_excel('davidson.xlsx', sheet_name='Argon Data New',
                   header=[2]).dropna(thresh=1)


for i, row in ar.iterrows():
    if 'Mixture' in row['Fuel']:
        # parse mixture
        mixture = row['Fuel']
        oxy_percent = float(re.compile(r'(\d+)%O2').search(
            mixture).groups()[0]) / 100.
        continue
    fuel = row['Fuel']
    # get gas
    try:
        gas = model_name[fuel]
    except KeyError:
        # not one of the model's were converting
        continue

    # get composition
    phi = float(row['Phi'])
    fuel_species = fuel_model_name[fuel]
    gas.set_equivalence_ratio(phi, fuel_species, 'O2')
    moles = gas.mole_fraction_dict()
    moles[fuel_species] *= oxy_percent
    moles['O2'] = oxy_percent
    moles['AR'] = 1 - sum(moles.values())
    gas.X = moles

    tau = float(row['tign (us)'])
    temp = float(row['T (K)'])
    pressure = float(row['P (atm)'])

    moles = gas.mole_fraction_dict()
    print(skeleton.substitute(
        Xfuel=moles[fuel_species],
        fuel_name=nice_fuel_name[fuel],
        XO2=moles["O2"],
        Dilutant="Ar",
        DChi="1S/Ar",
        XD=moles["AR"],
        tau=tau,
        temperature=temp,
        pressure=pressure,
        phi=phi))


# get air data -- skip empty rows
n2 = pd.read_excel('davidson.xlsx', sheet_name='N2 Data New',
                   header=[2]).dropna(thresh=1)


for i, row in n2.iterrows():
    fuel = row['Fuel']
    # get gas
    try:
        gas = model_name[fuel]
    except KeyError:
        # not one of the model's were converting
        continue

    # get composition
    phi = float(row['Phi'])
    fuel_species = fuel_model_name[fuel]
    gas.set_equivalence_ratio(phi, fuel_species, 'O2:1, N2:3.76')
    moles = gas.mole_fraction_dict()

    tau = float(row['tign (us)'])
    temp = float(row['T (K)'])
    pressure = float(row['P (atm)'])

    print(skeleton.substitute(
        Xfuel=moles[fuel_species],
        fuel_name=nice_fuel_name[fuel],
        XO2=moles["O2"],
        Dilutant="N2",
        DChi="1S/N2",
        XD=moles["N2"],
        tau=tau,
        temperature=temp,
        pressure=pressure,
        phi=phi))

Which can be run on the supplemental excel datasheet for that work (which I named 'davidson.xlsx').
The mechanisms used were the hychem high-temperature models for the various jet-fuels -- specifically, I only really used them for convenience of getting the state via the equivalence ratio. I can link the converted models on Slack if needed

A couple of things I'd love if someone looked over:

  • When they say in the paper "fuel data measured in 4% O2/balance argon", this means that the composition was 4% O2, Fuel determined by phi (w/ pure O2), and Argon as the remaining 1 - (XO2 - XFuel), w/ XO2=0.04 ...? This is what I assumed in the script.
  • Does this sentence in the paper:

Non-reactive pressure profiles in these experiments (using N2 instead of O2 in the mixture) were adjusted using driver inserts to limit pressure (and hence also temperature) variations to less than 1% over the required test times

imply that the relative uncertainty of the given pressure and temperature values are 1%? This is what I assumed in the file, but I'm not sure it's correct.

  • is it possible to have a common-properties that is generally correct, but needs an override for a specific value or keyword? For example here I have a lot of uncertainties of the form:
    pressure:
      - 16.1 atm
      - uncertainty-type: relative
        uncertainty: 0.01

I don't know if I can apply a common uncertainty inside that map?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant