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

New .cti files missing the 'negative_A' option on reactions. #67

Open
ajuluc opened this issue Sep 12, 2019 · 0 comments · May be fixed by #68
Open

New .cti files missing the 'negative_A' option on reactions. #67

ajuluc opened this issue Sep 12, 2019 · 0 comments · May be fixed by #68

Comments

@ajuluc
Copy link

ajuluc commented Sep 12, 2019

My input cti file has this pair of reactions

reaction('O(5) + CH2CHO(68) <=> CHO(22) + CH2O(9)', [5.000000e+13, 0.0, 0.0],
         options='duplicate')
reaction('O(5) + CH2CHO(68) <=> CHO(22) + CH2O(9)', [-2.993000e+23, -2.473, 19.927],
         options=['negative_A', 'duplicate'])

When outputting cti files within pymars the 'duplicate' option is added here

reaction_string += ',\n' + indent[8] + 'options = "duplicate"'

but the 'negative_A' option is lost.

This then causes a crash like this:

raceback (most recent call last):
  File "/home/ajulu.c/anaconda3/envs/flame_env/bin/pymars", line 12, in <module>
    sys.exit(main())
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/__main__.py", line 10, in main
    pymars(args)
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/pymars.py", line 319, in pymars
    path=args.path, num_threads=args.num_threads
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/pymars.py", line 186, in main
    threshold_upper=upper_threshold, num_threads=num_threads, path=path
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/drgep.py", line 416, in run_drgep
    num_threads=num_threads, path=path
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/drgep.py", line 331, in reduce_drgep
    num_threads=num_threads, path=path
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/sampling.py", line 208, in sample_metrics
    results.append(ignition_worker(job))
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/sampling.py", line 85, in ignition_worker
    sim.setup_case()
  File "/home/ajulu.c/anaconda3/envs/flame_env/lib/python3.7/site-packages/pymars/simulation.py", line 45, in setup_case
    self.gas = ct.Solution(self.model, self.phase_name)
  File "interfaces/cython/cantera/base.pyx", line 29, in cantera._cantera._SolutionBase.__cinit__
  File "interfaces/cython/cantera/base.pyx", line 78, in cantera._cantera._SolutionBase._init_cti_xml
cantera._cantera.CanteraError: 
***********************************************************************
CanteraError thrown by ElementaryReaction::validate:
Undeclared negative pre-exponential factor found in reaction 'CH2CHO(68) + O(5) <=> CH2O(9) + CHO(22)'
***********************************************************************
ajuluc added a commit to ajuluc/pyMARS that referenced this issue Sep 12, 2019
If a reaction has a negative pre-exponential factor, it must have a negative_A option in the cti file.
Fixes Niemeyer-Research-Group#67
@ajuluc ajuluc linked a pull request Sep 12, 2019 that will close this issue
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 a pull request may close this issue.

1 participant