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

Feature Request: Plog reaction support in CEPTR (currently leads to AttributeError: 'cantera.reaction.PlogRate' object has no ...) #538

Open
grabtheNS opened this issue Oct 29, 2024 · 4 comments · May be fixed by #549
Labels
enhancement New feature or request

Comments

@grabtheNS
Copy link

Hello,It seems that cepter does not support the cantera type: pressure-dependent Arrhenius form of chemical reaction.which like that :

  • equation: C6H5 + O2 => CJVCCVCCVO + CO # Reaction 854
    type: pressure-dependent-Arrhenius
    rate-constants:
    • {P: 0.1 atm, A: 1.128e+10, b: 0.64, Ea: -5135.0}
    • {P: 1.0 atm, A: 1.02e+14, b: -0.44, Ea: -1650.0}
    • {P: 10.0 atm, A: 2.42e+27, b: -4.09, Ea: 1.038e+04}
    • {P: 100.0 atm, A: 9.8e+43, b: -8.56, Ea: 2.683e+04}

when I try to use CEPTR convert(use convert.sh) yaml to generate C++ mechanism files ,it ouccurs that

Traceback (most recent call last):
File "", line 1, in
File "/home/zhangjiaqian/Desktop/PeleLMeX/Submodules/PelePhysics/Support/ceptr/ceptr/ceptr.py", line 201, in main
convert(
File "/home/zhangjiaqian/Desktop/PeleLMeX/Submodules/PelePhysics/Support/ceptr/ceptr/ceptr.py", line 71, in convert
conv.writer()
File "/home/zhangjiaqian/Desktop/PeleLMeX/Submodules/PelePhysics/Support/ceptr/ceptr/converter.py", line 453, in writer
cp.production_rate(
File "/home/zhangjiaqian/Desktop/PeleLMeX/Submodules/PelePhysics/Support/ceptr/ceptr/production.py", line 199, in production_rate
pef = (reaction.rate.pre_exponential_factor * ctuc).to_base_units()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'cantera.reaction.PlogRate' object has no attribute 'pre_exponential_factor'
what i use mechanism.yaml file url is below.
(https://github.com/grabtheNS/soot-chemical-mechanism-/blob/78840684f7a85712898c1093095bc2be4986697b/kaust.yaml)

It does not seem to support the pressure dependent chemical reaction format yaml file, but I am not sure what is the cause of this error.
Best regards!

@baperry2
Copy link
Contributor

We still don't support Plog-type reactions with CEPTR. See #487. Typically the recommendation is to convert the Plog reactions to constant pressure if that works for your system. @RSuryaNarayan - is that what you ended up doing in that case?

@RSuryaNarayan
Copy link

Hello @baperry2 apologies for missing the update on this. Essentially what we ended up doing was to remove PLOG reactions by just retaining parameters for one pressure "relevant to our problem" i.e. we were looking at detonations and just retained high P stuff. I hope that makes sense

@baperry2
Copy link
Contributor

baperry2 commented Oct 29, 2024

Thanks for the update @RSuryaNarayan. That's what I figured.

@grabtheNS: I'm going to leave this issue open to indicate Plog support is something we'd like to add, although there are no immediate plans to do so. As mentioned in the discussion linked above, we'd be happy to review a PR with this capability if anyone wants to implement it, but for now the only workaround is to remove pressure dependence from the relevant reactions.

@baperry2 baperry2 added the enhancement New feature or request label Oct 29, 2024
@baperry2 baperry2 changed the title CEPTR issue:AttributeError: 'cantera.reaction.PlogRate' object has no attribute 'pre_exponential_factor' Feature Request: Plog reaction support in CEPTR (currently leads to AttributeError: 'cantera.reaction.PlogRate' object has no ...) Oct 29, 2024
@ThomasHowarth
Copy link
Contributor

@terencelehmann Once you're happy with your implementation for this, feel free to open a pull request and mention this issue.

@baperry2 baperry2 linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants