Skip to content

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

@ajuluc

Description

@ajuluc

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)'
***********************************************************************

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions