Hi Cantera folks
I am going to model calcination of CaCO3 and am trying to create my own yaml data file by copying existing yaml files and adding the remaining data from chemical thermodynamics and statistical thermodynamics.
However running the following code:
import cantera as ct
p = ct.one_atm # pressure
T = 1173.0 # surface temperature
surf_phase = ct.Interface("CaCO3-calcination-surface.yaml", "CaO_surf")
gas = surf_phase.adjacent("gas")
CaCO3_phase = surf_phase.adjacent("CaCO3_s")
CaO_phase = surf_phase.adjacent("CaO_s")
surf_phase.TPX = T, p, 'CaO(S): 1, CO2(S):1 '
gas.TPX = T, p, 'N2:1, O2:0.01'
CaCO3_phase.TP = T, p
CaO_phase.TP = T, p
print(surf_phase.reactions())
print(surf_phase.forward_rate_constants)
print(surf_phase.forward_rates_of_progress)
I get the following error:
Traceback (most recent call last):
File "C:\Users\rml\PycharmProjects\ThermoChemistry\test.py", line 7, in <module>
surf_phase = ct.Interface("CaCO3-calcination-surface.yaml", "CaO_surf")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "build\\python\\cantera\\solutionbase.pyx", line 37, in cantera.solutionbase._SolutionBase.__cinit__
File "build\\python\\cantera\\solutionbase.pyx", line 95, in cantera.solutionbase._SolutionBase._cinit
File "build\\python\\cantera\\solutionbase.pyx", line 180, in cantera.solutionbase._SolutionBase._init_yaml
cantera._utils.CanteraError:
*******************************************************************************
InputFileError thrown by AnyMap::fromYamlFile:
Error on line 71 of C:\Users\rml\AppData\Local\miniconda3\Lib\site-packages\cantera\data/CaCO3-calcination-surface.yaml:
illegal map value
| Line |
| 66 | - [41780.19968, 0, 5.06587319, 0.001976948, -4.17802E-07, 0, 0, -7.78E+04, -24.60]
| 67 | equation-of-state:
| 68 | model: constant-volume
| 69 | density: 2.71 g/cm^3
| 70 | - name: CaO(S)
> 71 > composition: {Ca: 1, O: 1}
^
| 72 | sites: 1.0
| 73 | thermo:
| 74 | model: NASA7
*******************************************************************************
Obviously there is an error with the composition definition, but I can not see what's the problem.
I have attached my data file.
Thanks for your time
Mikael