Dear Ray,
thank you for working on this. I fully agree that it is a good idea to consolidate the cti and xml input files. After trying the cti2yaml converter on a PEM fuel cell cti file, I realized the following issue (full input files attached): The Reaction ID is not transferred to YAML.
cti Input:
ideal_interface(
name = "Platinum_surface_anode",
phases = 'gas_anode Platinum Nafion',
elements = "Pt H O",
species = "(PtAn) H(PtAn) H2O(PtAn)",
site_density = (2.50e-9,'mol/cm2'),
reactions = ["PtAn-*"]
)
surface_reaction ("H2 + (PtAn) + (PtAn) <=> H(PtAn) + H(PtAn)", stick(0.046, 0,(0,'kJ/mol')), id = 'PtAn-rxn01') # Tafel
surface_reaction ("H2O + (PtAn) <=> H2O(PtAn)", stick(1.0, 0,(0,'kJ/mol')), id = 'PtAn-rxn02')
edge_reaction ("H(PtAn) <=> H+[Nafion] + (PtAn) + electron", [1e38, 0.0, (200.0, 'kJ/mol')], beta = 0.5, id = 'PtAn-ctr02') # Volmer
edge_reaction ("H2 + (PtAn) <=> H(PtAn) + H+[Nafion] + electron", [1e48, 0, (200.0, 'kJ/mol')], beta = 0.5, id = 'PtAn-ctr01') # Heyrovski
yaml output:
phases:
- name: Platinum_surface_anode
thermo: surface
elements: [Pt, H, O]
species: [(PtAn), H(PtAn), H2O(PtAn)]
kinetics: surface
reactions: [Platinum_surface_anode-reactions]
site-density: 2.5e-09 mol/cm^2
Platinum_surface_anode-reactions:
- equation: H2 + (PtAn) + (PtAn) <=> H(PtAn) + H(PtAn) # Reaction 1
sticking-coefficient: {A: 0.046, b: 0, Ea: 0.0 kJ/mol}
- equation: "H2O + (PtAn) \t <=> H2O(PtAn)" # Reaction 2
sticking-coefficient: {A: 1.0, b: 0, Ea: 0.0 kJ/mol}
- equation: "H(PtAn)\t\t\t<=>\tH+[Nafion] + (PtAn) + electron" # Reaction 3
rate-constant: {A: 1.0e+38, b: 0.0, Ea: 200.0 kJ/mol}
beta: 0.5
- equation: "H2 + (PtAn)\t\t<=>\tH(PtAn) + H+[Nafion] + electron" # Reaction 4
rate-constant: {A: 1.0e+48, b: 0, Ea: 200.0 kJ/mol}
beta: 0.5
Thus, the individual reaction IDs are lost. Yet, we are using them from our C++ code for accessing specific reactions (via "interfaceKinetics->reaction(nr)->id"). We use this, for example, for sensitivity analyses. Thus I would suggest to keep a possibility for specifying an ID string.
Another minor comment: I like to structure my cti files in a way that each phase definition is followed by the needed species and reaction definitions for that phase, before the next phase is defined. The cti2yaml converter rearranges that structure (first all phases, then all species, then all reaction). Can the user re-order this file again?
Best regards,
Wolfgang