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

Troe Falloff Reactions and LOW reaction #173

Closed
dsondak opened this issue Jan 26, 2016 · 15 comments
Closed

Troe Falloff Reactions and LOW reaction #173

dsondak opened this issue Jan 26, 2016 · 15 comments

Comments

@dsondak
Copy link
Contributor

dsondak commented Jan 26, 2016

I would like to provide Antioch with an XML input for a hydrogen-air mechanism. The Chemkin file contains the following reaction (among many others):

2OH(+M)<=>H2O2(+M) 7.400E+13 -.370 .00
LOW / 2.300E+18 -.900 -1700.00/
TROE/ .7346 94.00 1756.00 5182.00 /
H2/2.00/ H2O/6.00/ CH4/2.00/ CO/1.50/ CO2/2.00/ C2H6/3.00/ AR/ .70/

After discussions with @hovr2pi , I understand the first line to actually be two different reactions:
2OH <=> H2O2
and
2OH + M <=> H2O2 + M.

From my understanding, the first reaction is just an elementary reaction with parameters given by the last three numbers on the first line.

The second reaction is where I am confused. It does not appear to be the usual ThreeBody reaction (with efficiencies given in the last line). From discussions with @hovr2pi (and consultations with the Antioch documentation) I understand that Antioch can handle Troe Falloff reactions (with parameters presumably given by the TROE line). However, I am not sure what to do about the LOW line. Is it just the parameters for a usual three-body reaction? Moreover, I simply do not know which one to implement.

Thanks for any help. Please let me know if you require any clarification.

@variscarey
Copy link

Technically it is one pressure dependent reaction. At the low pressure
limit the 3rd body(+M) is required for the reaction. At high pressure it
is the other (no M) reaction. The falloff model is the TROE type and as
you state, specifies the type and parameters for the model between the low
and high-pressure limits.

For more details see section 2.4.3.(pressure dependent reactions) in the
Chemkin manual.

Best,
Varis

On Tue, Jan 26, 2016 at 2:14 PM, dsondak notifications@github.com wrote:

I would like to provide Antioch with an XML input for a hydrogen-air
mechanism The Chemkin file contains the following reaction (among many
others):

2OH(+M)<=>H2O2(+M) 7400E+13 -370 00
LOW / 2300E+18 -900 -170000/
TROE/ 7346 9400 175600 518200 /
H2/200/ H2O/600/ CH4/200/ CO/150/ CO2/200/ C2H6/300/ AR/ 70/

After discussions with @hovr2pi https://github.com/hovr2pi , I
understand the first line to actually be two different reactions:
2OH <=> H2O2
and
2OH + M <=> H2O2 + M

From my understanding, the first reaction is just an elementary reaction
with parameters given by the last three numbers on the first line

The second reaction is where I am confused It does not appear to be the
usual ThreeBody reaction (with efficiencies given in the last line) From
discussions with @hovr2pi https://github.com/hovr2pi (and consultations
with the Antioch documentation) I understand that Antioch can handle Troe
Falloff reactions (with parameters presumably given by the TROE line)
However, I am not sure what to do about the LOW line Is it just the
parameters for a usual three-body reaction? Moreover, I simply do not know
which one to implement

Thanks for any help Please let me know if you require any clarification


Reply to this email directly or view it on GitHub
#173.

Varis Carey
Assistant Professor
Department of Mathematical and Statistical Sciences
University of Colorado Denver

@csim314
Copy link

csim314 commented Jan 27, 2016

Thanks for the clarification Varis.

How would one go about representing this in the xml input file format?

On Jan 26, 2016, at 3:55 PM, Varis Carey notifications@github.com wrote:

Technically it is one pressure dependent reaction. At the low pressure
limit the 3rd body(+M) is required for the reaction. At high pressure it
is the other (no M) reaction. The falloff model is the TROE type and as
you state, specifies the type and parameters for the model between the low
and high-pressure limits.

For more details see section 2.4.3.(pressure dependent reactions) in the
Chemkin manual.

Best,
Varis

On Tue, Jan 26, 2016 at 2:14 PM, dsondak notifications@github.com wrote:

I would like to provide Antioch with an XML input for a hydrogen-air
mechanism The Chemkin file contains the following reaction (among many
others):

2OH(+M)<=>H2O2(+M) 7400E+13 -370 00
LOW / 2300E+18 -900 -170000/
TROE/ 7346 9400 175600 518200 /
H2/200/ H2O/600/ CH4/200/ CO/150/ CO2/200/ C2H6/300/ AR/ 70/

After discussions with @hovr2pi https://github.com/hovr2pi , I
understand the first line to actually be two different reactions:
2OH <=> H2O2
and
2OH + M <=> H2O2 + M

From my understanding, the first reaction is just an elementary reaction
with parameters given by the last three numbers on the first line

The second reaction is where I am confused It does not appear to be the
usual ThreeBody reaction (with efficiencies given in the last line) From
discussions with @hovr2pi https://github.com/hovr2pi (and consultations
with the Antioch documentation) I understand that Antioch can handle Troe
Falloff reactions (with parameters presumably given by the TROE line)
However, I am not sure what to do about the LOW line Is it just the
parameters for a usual three-body reaction? Moreover, I simply do not know
which one to implement

Thanks for any help Please let me know if you require any clarification


Reply to this email directly or view it on GitHub
#173.

Varis Carey
Assistant Professor
Department of Mathematical and Statistical Sciences
University of Colorado Denver

Reply to this email directly or view it on GitHub.

@pbauman
Copy link
Member

pbauman commented Jan 27, 2016

Any reason not to try the existing ChemKin file?

@variscarey
Copy link

There's no troe falloff example in the xml parser antioch documentation.
However, in the xml_parser unit test (/test/input_files) test_parsing.xml
file, reactions #28-31 are different Troe falloff types. There are also
examples for other types of falloff models.

Varis

On Tue, Jan 26, 2016 at 8:58 PM, csim314 notifications@github.com wrote:

Thanks for the clarification Varis.

How would one go about representing this in the xml input file format?

On Jan 26, 2016, at 3:55 PM, Varis Carey notifications@github.com wrote:

Technically it is one pressure dependent reaction. At the low pressure
limit the 3rd body(+M) is required for the reaction. At high pressure it
is the other (no M) reaction. The falloff model is the TROE type and as
you state, specifies the type and parameters for the model between the
low
and high-pressure limits.

For more details see section 2.4.3.(pressure dependent reactions) in the
Chemkin manual.

Best,
Varis

On Tue, Jan 26, 2016 at 2:14 PM, dsondak notifications@github.com
wrote:

I would like to provide Antioch with an XML input for a hydrogen-air
mechanism The Chemkin file contains the following reaction (among many
others):

2OH(+M)<=>H2O2(+M) 7400E+13 -370 00
LOW / 2300E+18 -900 -170000/
TROE/ 7346 9400 175600 518200 /
H2/200/ H2O/600/ CH4/200/ CO/150/ CO2/200/ C2H6/300/ AR/ 70/

After discussions with @hovr2pi https://github.com/hovr2pi , I
understand the first line to actually be two different reactions:
2OH <=> H2O2
and
2OH + M <=> H2O2 + M

From my understanding, the first reaction is just an elementary
reaction
with parameters given by the last three numbers on the first line

The second reaction is where I am confused It does not appear to be the
usual ThreeBody reaction (with efficiencies given in the last line)
From
discussions with @hovr2pi https://github.com/hovr2pi (and
consultations
with the Antioch documentation) I understand that Antioch can handle
Troe
Falloff reactions (with parameters presumably given by the TROE line)
However, I am not sure what to do about the LOW line Is it just the
parameters for a usual three-body reaction? Moreover, I simply do not
know
which one to implement

Thanks for any help Please let me know if you require any clarification


Reply to this email directly or view it on GitHub
#173.

Varis Carey
Assistant Professor
Department of Mathematical and Statistical Sciences
University of Colorado Denver

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#173 (comment).

Varis Carey
Assistant Professor
Department of Mathematical and Statistical Sciences
University of Colorado Denver

@dsondak
Copy link
Contributor Author

dsondak commented Jan 27, 2016

@pbauman: I am quite new to Antioch (background is fluid mechanics, not chemistry) and the input file example that I am working from is in xml format. I am not opposed to using ChemKin format; I'll just need to work it out.

@variscarey: Thanks for pointing me to the tests! I think this has the example that I need.

@pbauman
Copy link
Member

pbauman commented Jan 27, 2016

I am quite new to Antioch (background is fluid mechanics, not chemistry) and the input file example that I am working from is in xml format. I am not opposed to using ChemKin format; I'll just need to work it out.

OK. You said you had a ChemKin file, so I'd just figured if you could use it that it would save you quite a bit of time converting the ChemKin to XML. Let us know if you have problems either way.

@dsondak
Copy link
Contributor Author

dsondak commented Jan 27, 2016

I think I've mostly figured out the xml input file now for the TroeFalloff and LindemannFalloff. One lingering issue is that I do not know how Antioch interprets the order of the blocks that I supply in the TroeFalloff reaction.

For example, here is the relevant reaction from the ChemKin file:

2OH(+M)<=>H2O2(+M) 7.400E+13 -.370 .00
LOW / 2.300E+18 -.900 -1700.00/
TROE/ .7346 94.00 1756.00 5182.00 /
H2/2.00/ H2O/6.00/ CH4/2.00/ CO/1.50/ CO2/2.00/ C2H6/3.00/ AR/ .70/

I implemented this in the xml input file as follows:

<reaction reversible="yes" type="TroeFalloff" id="reaction20">
  <equation>OH + OH + M [=] H2O2 + M</equation>
  <rateCoeff>
    <Kooij>
       <A units="cm3/mol/s">7.4e+13</A>
       <b>-0.370</b>
       <E units="cal/mol">0.0</E>
    </Kooij>
    <Kooij>
       <A units="cm6/mol2/s">2.3e+18</A>
       <b>-0.900</b>
       <E units="cal/mol">-1.7e+3</E>
    </Kooij>
    <Troe>
      <alpha> 0.7346 </alpha>
      <T1> 94.0     </T1>
      <T2> 1.756e+3 </T2>
      <T3> 5.182e+3 </T3>
    </Troe>
    <efficiencies default="1.0"> H2:2.00 H2O:6.00 CH4:2.00 CO:1.50 CO2:2.00 C2H6:3.00 Ar:0.70</efficiencies>
  </rateCoeff>
  <reactants>OH:2</reactants>
  <products>H2O2:1</products>
</reaction>

Which Kooij block corresponds to the low and high pressure limits? I assumed the first block corresponds to high and the second block corresponds to low. Is this correct? The test_parsing.xml file did not indicate which block was which.

@pbauman: The ChemKin file that I'm referring to would still need some processing, but it is probably still easier to use it than the xml form. Of course, once I figure out the xml form then at least I'll know.

@SylvainPlessis
Copy link
Contributor

Hello @dsondak,

the order assumed for the xml parser is just the reverse by default, from low to high. The explicit way of saying which is which is to use the attribute name="k0" for the low pressure rate constant.

The example in the test file for this is not the Kooij Troe falloff (actually, this one test the default). The Van't Hoff model in a Troe falloff for instance shows the explicit method: /test/input_files/test_parsing.xml.

I fully support xml usage instead of ChemKin 👍

@pbauman
Copy link
Member

pbauman commented Jan 27, 2016

Which Kooij block corresponds to the low and high pressure limits? I assumed the first block corresponds to high and the second block corresponds to low. Is this correct? The test_parsing.xml file did not indicate which block was which.

To be more explicit in the input, you can set an attribute in the reaction: name = k0, e.g. in the above <Kooij name="k0">. This will indicate that reaction is for the lower one. Then the other reaction (with no attribute) is the high one. This is actually Cantera's convention.

Looking at the parser code, it appears that if there's no name argument in XML, it assumes the first is low and the second is high. Yes, this needs to be documented. The function is here.

I confirmed the default "no attribute" ordering by adding the name attribute to both the first and second reactions in one of the falloff reactions in the test and the test failed when I added it to the second reaction.

We need add this coverage to the test suite. We also need to add error checking: Cantera reserves the name attribute for this in the context of setting up a falloff reaction, so we should the same and error out if the user doesn't put k0 here. I also noticed that even in the verbose print out, we don't differentiate between the low and the high rate. That's annoying. @SylvainPlessis got any time to fix this?

The ChemKin file that I'm referring to would still need some processing

If this is supposed to be a working ChemKin file and it's not working, we'd like to know so we can fix/update the ChemKin parser.

@pbauman
Copy link
Member

pbauman commented Jan 27, 2016

And I got ninja'ed by @SylvainPlessis.

@SylvainPlessis
Copy link
Contributor

And I got ninja'ed by @SylvainPlessis.

😎

We need add this coverage to the test suite. We also need to add error checking: Cantera reserves the name attribute for this in the context of setting up a falloff reaction, so we should the same and error out if the user doesn't put k0 here. I also noticed that even in the verbose print out, we don't differentiate between the low and the high rate. That's annoying. @SylvainPlessis got any time to fix this?

What exactly do we want? Adding to the verbose which is which should take something like two minutes (actually I think I'll do it tonight, like within the next hour), more I'd need to understand precisely what test(s) is/are needed.

Also I forgot in my previous comment, happily, @pbauman has a sharper eye:
@dsondak

The ChemKin file that I'm referring to would still need some processing

If this is supposed to be a working ChemKin file and it's not working, we'd like to know so we can fix/update the ChemKin parser.

What preprocessing is needed? It does sound like an Antioch failure/problem/bug/what-the-hell-ChemKin (cross out non-applying words), that's annoying...

@pbauman
Copy link
Member

pbauman commented Jan 27, 2016

What exactly do we want?

Three things (beyond the happier verbose output which you just said you'd do).

  1. I'd missed that you had a name attribute in the test xml file. Do we test specifying the sections in both orders with the name attribute? If not, we should test that.
  2. Error out if the name attribute is not k0 in the is_k0 function. Also error out if both reactions have the name specifier (this is what Cantera does, presumably we're trying to stay cross-compatible?).
  3. Document in the input specification in the is_k0 function. In particular, both the name attribute and the default ordering.

Thanks much if you have time for any of that.

@SylvainPlessis
Copy link
Contributor

  1. I'd missed that you had a name attribute in the test xml file. Do we test specifying the sections in both orders with the name attribute? If not, we should test that.

Funnily, this made me realize we test only if name="k0" is on the second one. This will be corrected.

  1. Error out if the name attribute is not k0 in the is_k0 function. Also error out if both reactions have the name specifier (this is what Cantera does, presumably we're trying to stay cross-compatible?).

You're right, such verifications would be welcomed, I'm on it.

  1. Document in the input specification in the is_k0 function. In particular, both the name attribute and the default ordering.

That's may be a good idea 😄.

It should be ok to do all this, probably tonight, at least in a test passing way with the existing test. I'll see if I can cook some expected failures too.

@dsondak
Copy link
Contributor Author

dsondak commented Jan 27, 2016

@SylvainPlessis: Sorry for the confusion about the ChemKin file. I just meant that there are more reactions in it than I need so I'd need to remove several reactions. It's not a big deal and has nothing to do with Antioch. Whether or not I use the xml format or the ChemKin format, I'd still need to do some tedious work since the ChemKin file is not ready to go as is. Hence, working with the xml file is fine for me even though it may require slightly more time.

Thanks for all of your quick and helpful responses!

@pbauman
Copy link
Member

pbauman commented Feb 5, 2016

OK, I think we resolved this. I'll be hacking on the XML parser today, mostly to get the thermo fixed.

@pbauman pbauman closed this as completed Feb 5, 2016
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

No branches or pull requests

5 participants