AMReX-Combustion / PelePhysics

A collection of physics databases and implementation code for use with the Pele suite of of codes
https://amrex-combustion.github.io/PelePhysics/
Other
61 stars 52 forks source link

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

Open grabtheNS opened 2 weeks ago

grabtheNS commented 2 weeks ago

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

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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.

ThomasHowarth commented 3 days ago

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