Compare commits
789 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba330a797e | ||
|
|
e320ec785e | ||
|
|
088c52fff2 | ||
|
|
719cb3d2b7 | ||
|
|
197c69a476 | ||
|
|
5bc81bf397 | ||
|
|
334a496267 | ||
|
|
456bc32f23 | ||
|
|
72082d026a | ||
|
|
7d72cc9baa | ||
|
|
f67d9113db | ||
|
|
2fdbce42b2 | ||
|
|
f5f7227e79 | ||
|
|
1cc87f4372 | ||
|
|
02c433b9a2 | ||
|
|
d4f9717c1c | ||
|
|
efb246d73a | ||
|
|
21de00c549 | ||
|
|
e2bfba328c | ||
|
|
58063b498a | ||
|
|
91c7bf14d7 | ||
|
|
cf315f7c5e | ||
|
|
2a9554c134 | ||
|
|
58fc8f770c | ||
|
|
d730b4c5e8 | ||
|
|
eda3b2fbfb | ||
|
|
9f6cba3c33 | ||
|
|
a0350925a7 | ||
|
|
40ae5b5fb5 | ||
|
|
43d02e95e3 | ||
|
|
ce47733c42 | ||
|
|
6dbcd94029 | ||
|
|
71ba021467 | ||
|
|
65f7b16f01 | ||
|
|
a5b28ba799 | ||
|
|
bddb339198 | ||
|
|
69393e9307 | ||
|
|
eb02fa9726 | ||
|
|
54c12fc59c | ||
|
|
4f42164443 | ||
|
|
3ef99f966c | ||
|
|
a85396ef11 | ||
|
|
1e01054bf5 | ||
|
|
cd67962004 | ||
|
|
f02ca90e2c | ||
|
|
76901b7f50 | ||
|
|
3b7eb0dc8d | ||
|
|
a221c632f4 | ||
|
|
5cca4f22df | ||
|
|
8665eda3c1 | ||
|
|
a085bc1f43 | ||
|
|
6c8adf47b3 | ||
|
|
ee41824b1e | ||
|
|
650db397b2 | ||
|
|
d43774e721 | ||
|
|
cb0e1f1509 | ||
|
|
cf8d2efa09 | ||
|
|
5ab15e15ce | ||
|
|
dc66407cf2 | ||
|
|
63da219947 | ||
|
|
7c08e17f08 | ||
|
|
6e5d45273a | ||
|
|
5928d63746 | ||
|
|
b5e4f25454 | ||
|
|
3bf09fbd7f | ||
|
|
af04f97d0e | ||
|
|
fef352b9d5 | ||
|
|
d8e09a9550 | ||
|
|
dbac2fc79c | ||
|
|
b926a31faf | ||
|
|
f71954ac96 | ||
|
|
b5137d40a3 | ||
|
|
799ef81518 | ||
|
|
486e2ba9b8 | ||
|
|
afd36b1c1e | ||
|
|
c149c4ed73 | ||
|
|
55fe2233b1 | ||
|
|
fe7be79552 | ||
|
|
074fd2cd74 | ||
|
|
2b61d3ad4a | ||
|
|
213612bd33 | ||
|
|
378c6da18b | ||
|
|
69f33a8631 | ||
|
|
ecce98c1dc | ||
|
|
b44f189569 | ||
|
|
c4aff04418 | ||
|
|
9ce255302e | ||
|
|
5e692e893a | ||
|
|
717635d3e6 | ||
|
|
76dd997692 | ||
|
|
2231141e32 | ||
|
|
e0fe5eed59 | ||
|
|
265a1860cc | ||
|
|
7ac09108c9 | ||
|
|
eff23b6f82 | ||
|
|
eea04255fd | ||
|
|
5184ebccba | ||
|
|
1606ce1565 | ||
|
|
6a8d7f7de3 | ||
|
|
3b948e17d4 | ||
|
|
97356a48df | ||
|
|
27f30c6a2d | ||
|
|
fc01d7f3de | ||
|
|
ded50547f9 | ||
|
|
b5a7575bc0 | ||
|
|
a7363e4b54 | ||
|
|
7461c3c960 | ||
|
|
dc96fb5fe8 | ||
|
|
541fddb15e | ||
|
|
3e6e57edbf | ||
|
|
3e4842be9e | ||
|
|
bbdc790257 | ||
|
|
bc8b4be654 | ||
|
|
7523022d71 | ||
|
|
bfa5a66ed3 | ||
|
|
c0f019407e | ||
|
|
dda89663ea | ||
|
|
6852087ff5 | ||
|
|
582eb42b2f | ||
|
|
d263566670 | ||
|
|
77295b2103 | ||
|
|
296e2912e5 | ||
|
|
ed59ae9516 | ||
|
|
386c215b3b | ||
|
|
409227cd05 | ||
|
|
5f08b362aa | ||
|
|
27438751ce | ||
|
|
8d57424188 | ||
|
|
2e54811549 | ||
|
|
1e2a9f23a3 | ||
|
|
a4ad2f5d66 | ||
|
|
674c37ce3c | ||
|
|
c840142bff | ||
|
|
2d2004da7e | ||
|
|
8502d18ff7 | ||
|
|
946ed901a0 | ||
|
|
a247d0f4eb | ||
|
|
edcc9c59fd | ||
|
|
67087f874d | ||
|
|
cceb12b01b | ||
|
|
bc6dd4ddc0 | ||
|
|
ae792dde00 | ||
|
|
bbab606a20 | ||
|
|
360ac9b79e | ||
|
|
dced8fbcad | ||
|
|
df5a3ae08f | ||
|
|
a573b32770 | ||
|
|
2e8b860ccd | ||
|
|
d705ff760a | ||
|
|
674701b0c2 | ||
|
|
f2f05e5ed1 | ||
|
|
165f11dfca | ||
|
|
44c5094bb2 | ||
|
|
a7aa6e721a | ||
|
|
baacc563b8 | ||
|
|
b77f368ead | ||
|
|
53faf54ceb | ||
|
|
0b04881b8d | ||
|
|
69371e5751 | ||
|
|
8037497dd3 | ||
|
|
040ffe4711 | ||
|
|
891a4e74d3 | ||
|
|
8eb52a7afb | ||
|
|
d66abc5234 | ||
|
|
672b55a72f | ||
|
|
d77a5979a8 | ||
|
|
b1273301cc | ||
|
|
088e0031fd | ||
|
|
f1937bfada | ||
|
|
3011374ff6 | ||
|
|
ecc1cf0db2 | ||
|
|
9e98aef969 | ||
|
|
0d1196bd46 | ||
|
|
b0209bdf37 | ||
|
|
26bd71af53 | ||
|
|
9ffab53a17 | ||
|
|
901ec2f12c | ||
|
|
6a8c378846 | ||
|
|
fd088889cd | ||
|
|
338a38b87c | ||
|
|
48a32ae8bf | ||
|
|
580b75b2d2 | ||
|
|
45d5099979 | ||
|
|
3028c14a10 | ||
|
|
56612115f3 | ||
|
|
7d964dae47 | ||
|
|
d8a1337933 | ||
|
|
4f30f1156d | ||
|
|
72d345619f | ||
|
|
1e8b8b538c | ||
|
|
a3024d7699 | ||
|
|
8b47274765 | ||
|
|
07aadbce6c | ||
|
|
fb1054a259 | ||
|
|
e7c6495ec7 | ||
|
|
1bdbf2a010 | ||
|
|
89838c3ffb | ||
|
|
6dac1b0409 | ||
|
|
fdfbc58a1e | ||
|
|
2c58dd78c6 | ||
|
|
d7734e3f19 | ||
|
|
cae5c498ca | ||
|
|
98a9566fc4 | ||
|
|
a5bf674419 | ||
|
|
40c403c07d | ||
|
|
6d6f34bee3 | ||
|
|
96124f8455 | ||
|
|
59b0f64e26 | ||
|
|
8a0eed3be5 | ||
|
|
be4d9cbc55 | ||
|
|
f0dc990764 | ||
|
|
f4d45f8a85 | ||
|
|
c8b737035d | ||
|
|
3251a3533e | ||
|
|
0264c66f79 | ||
|
|
7d3488a973 | ||
|
|
afd5d82280 | ||
|
|
a32e32b7d7 | ||
|
|
e28c9add21 | ||
|
|
71bf44d11f | ||
|
|
84fa231ea2 | ||
|
|
6e3053dd1c | ||
|
|
4c5040e829 | ||
|
|
f0bb0d2262 | ||
|
|
86c73dad20 | ||
|
|
74eec731f1 | ||
|
|
7211f08891 | ||
|
|
7ff6e8fac2 | ||
|
|
2b41486850 | ||
|
|
3eaa32dea3 | ||
|
|
aef101fee7 | ||
|
|
7a97ff9917 | ||
|
|
24d1e86440 | ||
|
|
b54ea8bd82 | ||
|
|
d476ad8e59 | ||
|
|
cb31c297cf | ||
|
|
8b502d4065 | ||
|
|
0220e11ef9 | ||
|
|
de80f06887 | ||
|
|
224c46ebbb | ||
|
|
65121becac | ||
|
|
da097631e3 | ||
|
|
c9b7de3b70 | ||
|
|
b8cb2c30f8 | ||
|
|
ea88d4f9fb | ||
|
|
530adbb931 | ||
|
|
e5bd0b136f | ||
|
|
00f6b88fa4 | ||
|
|
e85e0e2108 | ||
|
|
ed24198e63 | ||
|
|
4bd1ca1cde | ||
|
|
56cb190a64 | ||
|
|
444ef91e0f | ||
|
|
142f533229 | ||
|
|
3588be16f3 | ||
|
|
007ecf0c7c | ||
|
|
857bb0a769 | ||
|
|
9a5c2708e5 | ||
|
|
265032da8f | ||
|
|
ba8ac1d519 | ||
|
|
fb3dee36c5 | ||
|
|
813d5064ae | ||
|
|
0ed2b38594 | ||
|
|
6a42e5942e | ||
|
|
ea3bb0af90 | ||
|
|
5d62f3bacc | ||
|
|
751afa3c2b | ||
|
|
fbe4ce5c1b | ||
|
|
f078f53f39 | ||
|
|
848a3bf0e3 | ||
|
|
d2cb02f254 | ||
|
|
654e582bc0 | ||
|
|
d25637d0ea | ||
|
|
471041a27a | ||
|
|
4026c17915 | ||
|
|
cb008a95d7 | ||
|
|
337f33baad | ||
|
|
968dc24925 | ||
|
|
5e226535de | ||
|
|
6c0866efb8 | ||
|
|
d6d91f4d98 | ||
|
|
bdc81684b1 | ||
|
|
aceb896f62 | ||
|
|
47005a5008 | ||
|
|
1f70f7751c | ||
|
|
ec7f779434 | ||
|
|
6c82b61c3d | ||
|
|
5601ee9067 | ||
|
|
5ad656e342 | ||
|
|
540777c32b | ||
|
|
0fdbe24aaf | ||
|
|
90d2ec41ca | ||
|
|
8bcb62f727 | ||
|
|
8689809d9e | ||
|
|
ce9a17dd92 | ||
|
|
7691d7f9d3 | ||
|
|
b8367d6fe8 | ||
|
|
50997a1651 | ||
|
|
77b467929c | ||
|
|
7cf58af69e | ||
|
|
f0c797c482 | ||
|
|
e4789d7102 | ||
|
|
84b4147a99 | ||
|
|
8169c26271 | ||
|
|
11271d90b2 | ||
|
|
366d1942ef | ||
|
|
05fdd356f2 | ||
|
|
ae555fb063 | ||
|
|
3c9bbc4ec9 | ||
|
|
b8d5eb405a | ||
|
|
a7449c6cc8 | ||
|
|
224ef720e6 | ||
|
|
d04fd8cc39 | ||
|
|
aa9721dbe9 | ||
|
|
9d4c0eda03 | ||
|
|
cb5620996c | ||
|
|
e3424d8ed4 | ||
|
|
33e198f7e5 | ||
|
|
f385f48190 | ||
|
|
ebb93cb5a2 | ||
|
|
3ff5d87b81 | ||
|
|
46b7cf180a | ||
|
|
dc09040274 | ||
|
|
1ec9ce2c01 | ||
|
|
35be561d99 | ||
|
|
9f5dfbdb12 | ||
|
|
d9b95b2efb | ||
|
|
05eaa0a5e4 | ||
|
|
4b3bb8f8fc | ||
|
|
27c64b76f8 | ||
|
|
311ae76510 | ||
|
|
af56138e14 | ||
|
|
4d5cd502a2 | ||
|
|
cbe763836e | ||
|
|
1bb081d769 | ||
|
|
a347ad36c4 | ||
|
|
d56b6205fa | ||
|
|
b633544477 | ||
|
|
e3230801c9 | ||
|
|
19577abfbe | ||
|
|
6a859215f8 | ||
|
|
6f45b241b5 | ||
|
|
0257c4868e | ||
|
|
68a89d0322 | ||
|
|
27d9b6413a | ||
|
|
442433ad37 | ||
|
|
9aa507a098 | ||
|
|
84535483f9 | ||
|
|
3e9b0e0c07 | ||
|
|
1b5f0f4fe9 | ||
|
|
9f3dc70949 | ||
|
|
c93bddf9a0 | ||
|
|
ded7c674e6 | ||
|
|
b2acc43a81 | ||
|
|
4f4a2bd071 | ||
|
|
c1d721dc94 | ||
|
|
600580ead4 | ||
|
|
c26db356e3 | ||
|
|
b9a5913af0 | ||
|
|
22efbe25dc | ||
|
|
8c213da932 | ||
|
|
ca8700fdd4 | ||
|
|
4fe58661e1 | ||
|
|
c988f57e01 | ||
|
|
1acb00bc99 | ||
|
|
680af58950 | ||
|
|
acd75e20fe | ||
|
|
7986046bdd | ||
|
|
8e7e27ad62 | ||
|
|
87b042a231 | ||
|
|
7f13f4d832 | ||
|
|
e0d3509597 | ||
|
|
d7292b3345 | ||
|
|
d143e8e1f0 | ||
|
|
7e56bbaafe | ||
|
|
72d2fc4f8c | ||
|
|
59eabbe454 | ||
|
|
7142a7b0c4 | ||
|
|
09ee87068a | ||
|
|
0f1da269fc | ||
|
|
d01992c79c | ||
|
|
9279e0828e | ||
|
|
4de4aa3f65 | ||
|
|
43565c90f5 | ||
|
|
dd7c97cb1d | ||
|
|
0707caaee6 | ||
|
|
d2a1bf1e6a | ||
|
|
33591282f5 | ||
|
|
d6da006e3e | ||
|
|
dcb7f34b4a | ||
|
|
e2cfb7f505 | ||
|
|
9df98d6ac1 | ||
|
|
1166c74127 | ||
|
|
b0b66d7211 | ||
|
|
0ade0acf18 | ||
|
|
426c2bc56e | ||
|
|
ff4958a720 | ||
|
|
b0deb41708 | ||
|
|
d9f9f69fc3 | ||
|
|
f46df83841 | ||
|
|
ef40d4418d | ||
|
|
b7f3ab561b | ||
|
|
fc7c85f8d1 | ||
|
|
719dbcc650 | ||
|
|
833d79aeb6 | ||
|
|
51263193de | ||
|
|
e4362d37e7 | ||
|
|
c4e89ac5da | ||
|
|
a1f9a178e0 | ||
|
|
8f2468da52 | ||
|
|
fefc008ed2 | ||
|
|
7a697a4047 | ||
|
|
f1d8d9b1b9 | ||
|
|
0417d31d0e | ||
|
|
af51a61ab1 | ||
|
|
af4ccaee09 | ||
|
|
323c7370db | ||
|
|
ff91457b5a | ||
|
|
1ca6c5eb40 | ||
|
|
dc5ec06a0c | ||
|
|
2f67c9969d | ||
|
|
a68c048bfa | ||
|
|
d3f49e74cb | ||
|
|
820b9de4b0 | ||
|
|
331e11366a | ||
|
|
57b38ce40f | ||
|
|
e7a48375dc | ||
|
|
166249869b | ||
|
|
a54ab2f3ef | ||
|
|
ac8612f36b | ||
|
|
ee633f3e16 | ||
|
|
3ade3335de | ||
|
|
5082a212c4 | ||
|
|
2527869536 | ||
|
|
a5762ea6b6 | ||
|
|
c1067aa6e9 | ||
|
|
045f3d37bf | ||
|
|
fb68cae145 | ||
|
|
b5b542d10b | ||
|
|
4911539b56 | ||
|
|
5f556acd34 | ||
|
|
1864e8fd6c | ||
|
|
677efd82d5 | ||
|
|
bdaabc0428 | ||
|
|
fd57936b18 | ||
|
|
e79cf6f8cb | ||
|
|
c3ba264284 | ||
|
|
053267e254 | ||
|
|
b84d3e3f79 | ||
|
|
0d559778a7 | ||
|
|
33840414e5 | ||
|
|
7e1b6a1489 | ||
|
|
d33e67c36c | ||
|
|
c28bc0235f | ||
|
|
d2252037c6 | ||
|
|
549463683d | ||
|
|
4ea9d35a2b | ||
|
|
3fae1c1a9a | ||
|
|
9670c5dac6 | ||
|
|
2f3a0122d6 | ||
|
|
dbc3df1687 | ||
|
|
e8d28b0e89 | ||
|
|
2a7aed8968 | ||
|
|
3052701250 | ||
|
|
21db5d84f3 | ||
|
|
b68a87d624 | ||
|
|
d57f1d147d | ||
|
|
7a69386b8d | ||
|
|
e7f346cddf | ||
|
|
e81cac9582 | ||
|
|
71072c43db | ||
|
|
cc9c8e5633 | ||
|
|
7b6d04c381 | ||
|
|
1b605133d8 | ||
|
|
435f28641e | ||
|
|
35aa8be61e | ||
|
|
333d388f90 | ||
|
|
9bad354553 | ||
|
|
fb4a36b1ca | ||
|
|
5c783c708f | ||
|
|
1245a694e5 | ||
|
|
fa9b9374cf | ||
|
|
f7852ad84c | ||
|
|
eeb27d84a9 | ||
|
|
3a0f46eb56 | ||
|
|
b7e32e4604 | ||
|
|
4b4128aebd | ||
|
|
a1c12b4a3b | ||
|
|
d4492f3ea3 | ||
|
|
3c3ef10f93 | ||
|
|
29a3c19399 | ||
|
|
d38d9da32c | ||
|
|
3c978cdff6 | ||
|
|
74167cc3eb | ||
|
|
dab739013e | ||
|
|
309871ae88 | ||
|
|
51d0d43a45 | ||
|
|
e42b952a8a | ||
|
|
3be3f7dad5 | ||
|
|
99d4972e6b | ||
|
|
6b3c912ec3 | ||
|
|
c8305375ef | ||
|
|
3fac5f2bc6 | ||
|
|
b26dc65c41 | ||
|
|
55490de871 | ||
|
|
07eed363fe | ||
|
|
df6ecb101b | ||
|
|
172e9ffead | ||
|
|
84acdb1a30 | ||
|
|
a9ad75e974 | ||
|
|
277aa0b913 | ||
|
|
cc93ce62ca | ||
|
|
b1a010e3a3 | ||
|
|
0b8f0283aa | ||
|
|
5b4a977df7 | ||
|
|
d09161716f | ||
|
|
66ba4b5b50 | ||
|
|
39c4103504 | ||
|
|
0120f2fc5e | ||
|
|
ed648d308d | ||
|
|
fde5051131 | ||
|
|
4bd5e92694 | ||
|
|
a03afbd56e | ||
|
|
c9b0bce8b9 | ||
|
|
de3ec3d53e | ||
|
|
8de267f25c | ||
|
|
e052a44e92 | ||
|
|
aac8eb92af | ||
|
|
3d59914e6f | ||
|
|
d28032e845 | ||
|
|
6d22be2a6b | ||
|
|
20f891f1a4 | ||
|
|
a22db9fa22 | ||
|
|
322b1fc375 | ||
|
|
82c959d3a3 | ||
|
|
9c50f7528c | ||
|
|
50a3fecb23 | ||
|
|
a0ac2b0cc6 | ||
|
|
66597b72ff | ||
|
|
c29fbc808e | ||
|
|
1a394a3402 | ||
|
|
8195403fef | ||
|
|
05fa4df3b9 | ||
|
|
2abc57e2f1 | ||
|
|
c78a11b32f | ||
|
|
0d20b50543 | ||
|
|
977a1c7736 | ||
|
|
8caf5e5aca | ||
|
|
581cfb7c04 | ||
|
|
419a09c414 | ||
|
|
ec5aecd3d6 | ||
|
|
af4a78ddde | ||
|
|
e6b4761c6b | ||
|
|
e846505f57 | ||
|
|
bde6e05452 | ||
|
|
70016b97b3 | ||
|
|
f47e98a594 | ||
|
|
d86a7c176e | ||
|
|
987a247bd0 | ||
|
|
536158b402 | ||
|
|
a31b7d1bb5 | ||
|
|
411be3e6cf | ||
|
|
46f8ef52a7 | ||
|
|
4affcd1efb | ||
|
|
552ba97a2b | ||
|
|
831b92dac4 | ||
|
|
ebc478f8ec | ||
|
|
24940aeef7 | ||
|
|
67aa9eb4e3 | ||
|
|
7eb4eaa13a | ||
|
|
dfd4b7e671 | ||
|
|
7a314d3124 | ||
|
|
4b352751f5 | ||
|
|
3e39a0bc3d | ||
|
|
4e6af27edf | ||
|
|
5d599bb680 | ||
|
|
9c9ee9e919 | ||
|
|
9f4590bc6f | ||
|
|
c233ddcd30 | ||
|
|
43b42e9942 | ||
|
|
f824b20fe2 | ||
|
|
3933a943dc | ||
|
|
89fded32d4 | ||
|
|
6cd7bf160f | ||
|
|
1eebd3efdb | ||
|
|
17dfa2dd48 | ||
|
|
07409dea59 | ||
|
|
7054a7bb3d | ||
|
|
4a4886f63e | ||
|
|
deeaaed03f | ||
|
|
2ac8a0ef08 | ||
|
|
501b5fd1f5 | ||
|
|
4771874c75 | ||
|
|
8f02c777a5 | ||
|
|
0d01d031a9 | ||
|
|
6f564e6101 | ||
|
|
831239633d | ||
|
|
2f03a1e531 | ||
|
|
26216e9adc | ||
|
|
77ee76c5f3 | ||
|
|
11943bbc6f | ||
|
|
6ca67b4845 | ||
|
|
2bc4d09da3 | ||
|
|
94ea9b585f | ||
|
|
1635cd2e04 | ||
|
|
136c86636e | ||
|
|
d1f9b9393a | ||
|
|
16fd18315c | ||
|
|
684262e945 | ||
|
|
60d2075492 | ||
|
|
83ffd844d1 | ||
|
|
87a7deb35d | ||
|
|
686250e51f | ||
|
|
f8d183220c | ||
|
|
713b9cc23c | ||
|
|
6844e52713 | ||
|
|
e921cb89c8 | ||
|
|
680d0841b5 | ||
|
|
405750f61d | ||
|
|
21c2215117 | ||
|
|
b92bd24f92 | ||
|
|
3820ca3147 | ||
|
|
1b97c49d8d | ||
|
|
7d0bc71448 | ||
|
|
0c0a38d4fe | ||
|
|
a99004d8ef | ||
|
|
2472e080c3 | ||
|
|
a8cbfd2c41 | ||
|
|
1be8374342 | ||
|
|
e78aac7b70 | ||
|
|
2a601c148f | ||
|
|
acbd65d192 | ||
|
|
48eaedbbb4 | ||
|
|
89bca5fcd1 | ||
|
|
9c3b500ec8 | ||
|
|
4b5a37a336 | ||
|
|
739d4e4830 | ||
|
|
7eb939dc5f | ||
|
|
4e53c893cf | ||
|
|
da3ba35945 | ||
|
|
bba0d8edf0 | ||
|
|
8522095dea | ||
|
|
da801f4cbc | ||
|
|
08726b0904 | ||
|
|
ee323bbafc | ||
|
|
d9418bb8fb | ||
|
|
279c5c8556 | ||
|
|
4934079d69 | ||
|
|
7020fa72bf | ||
|
|
4b5af64050 | ||
|
|
ea69a014a5 | ||
|
|
d035557531 | ||
|
|
a520f782db | ||
|
|
be8e51d217 | ||
|
|
286217d1d3 | ||
|
|
a19b2bd4cc | ||
|
|
ee663c9b37 | ||
|
|
822cdc7d38 | ||
|
|
4c630fc592 | ||
|
|
0ca788bd69 | ||
|
|
c88ddce0d6 | ||
|
|
4b44c66182 | ||
|
|
bce4210e1b | ||
|
|
572af616e7 | ||
|
|
e9f08fc58e | ||
|
|
3790115b99 | ||
|
|
4b69c7f265 | ||
|
|
d07908f9c9 | ||
|
|
1bd950fef5 | ||
|
|
6ca782030d | ||
|
|
cfc3b728f5 | ||
|
|
e33fe6904d | ||
|
|
e3afaf5e61 | ||
|
|
7fab7f3cd3 | ||
|
|
c85ba586d2 | ||
|
|
4856d1328b | ||
|
|
338b21694f | ||
|
|
aa02d24235 | ||
|
|
8a4142d4bc | ||
|
|
4c489c175d | ||
|
|
513b43200c | ||
|
|
45891a2118 | ||
|
|
9e5da87a2a | ||
|
|
3f69f6ac8a | ||
|
|
3d03795c4f | ||
|
|
d4338249fb | ||
|
|
8d953a9424 | ||
|
|
3676672eec | ||
|
|
04f10972c8 | ||
|
|
d744bd9fb8 | ||
|
|
6bfd82e0be | ||
|
|
f3ba29f0bc | ||
|
|
37be501a68 | ||
|
|
a5b0bdf695 | ||
|
|
90d18dd337 | ||
|
|
9c084d5c84 | ||
|
|
f69ef44600 | ||
|
|
4818c87344 | ||
|
|
44b24ca873 | ||
|
|
6d591b82ef | ||
|
|
55a8910686 | ||
|
|
b41038f84b | ||
|
|
35ac1acfa8 | ||
|
|
fec6c34ed8 | ||
|
|
05809bb027 | ||
|
|
04be9888ed | ||
|
|
6bf74d179b | ||
|
|
d920f2eb2c | ||
|
|
c125878a40 | ||
|
|
c092484f4d | ||
|
|
43bd96b5ba | ||
|
|
94a4439bd4 | ||
|
|
22ecade329 | ||
|
|
1057d20731 | ||
|
|
6b6d758f23 | ||
|
|
9dd0134e31 | ||
|
|
e2f718c65b | ||
|
|
3b12c6d662 | ||
|
|
3accd415e8 | ||
|
|
2a38b0a765 | ||
|
|
52dbe8c007 | ||
|
|
bfdc2b9e1d | ||
|
|
974bbc7da4 | ||
|
|
56022e8989 | ||
|
|
2c3512c22a | ||
|
|
51f419fbad | ||
|
|
f9d5f16b72 | ||
|
|
95a52b2d34 | ||
|
|
afafa34c06 | ||
|
|
a6ac446021 | ||
|
|
f8ef4a8b2b | ||
|
|
31d54c3b11 | ||
|
|
b033d44d3e | ||
|
|
2b73fe24ba | ||
|
|
6154e1b4bd | ||
|
|
5efea12959 | ||
|
|
3ea2a6caf3 | ||
|
|
461b63e462 | ||
|
|
3c771ded2b | ||
|
|
c28ca48cf8 | ||
|
|
04cac2b277 | ||
|
|
ff46dc93b5 | ||
|
|
fca22d94e5 | ||
|
|
574462fd3c | ||
|
|
3a119381e8 | ||
|
|
dfb32f0c7e | ||
|
|
35679c2e9e | ||
|
|
dd521de254 | ||
|
|
ecbd819e91 | ||
|
|
11a0727d5c | ||
|
|
a02753ae79 | ||
|
|
7b7aea2038 | ||
|
|
db1f1af0a0 | ||
|
|
70e10632d4 | ||
|
|
0a1257daed | ||
|
|
b39537bfcb | ||
|
|
50ed3f2e72 | ||
|
|
7b529ac2d6 | ||
|
|
38d291c683 | ||
|
|
0249ce89b8 | ||
|
|
092e00744b | ||
|
|
5a0fb579a8 | ||
|
|
3093e6e6d4 | ||
|
|
0d982c8f58 | ||
|
|
7673f7cb52 | ||
|
|
66998a5ae1 | ||
|
|
eae9250f2e | ||
|
|
3c82c3a6c6 | ||
|
|
e5edc319de | ||
|
|
19c17d149b | ||
|
|
507a3a9985 | ||
|
|
86dca05369 | ||
|
|
62c67e4ad1 | ||
|
|
ed8de04e5b | ||
|
|
6a52908d85 | ||
|
|
78d5809d6f | ||
|
|
3f6f580b25 | ||
|
|
5fcbfde40e | ||
|
|
2678b57d58 | ||
|
|
c982f50421 | ||
|
|
0fd2f7c4d0 | ||
|
|
7979a2b52a | ||
|
|
8e89bbb8d2 | ||
|
|
17c1f9dc14 | ||
|
|
ac5337130a | ||
|
|
886d7b7cdc | ||
|
|
26651cc72c | ||
|
|
0281d14e39 | ||
|
|
d2aeb8fa28 |
884 changed files with 45652 additions and 82030 deletions
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
github: [numfocus]
|
||||
custom: ['https://numfocus.org/donate-to-cantera']
|
||||
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Report reproducible software issues so we can improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
Please fill in the following information to report a problem with Cantera.
|
||||
If you have a question about using Cantera, please post it on our
|
||||
[Google Users' Group](https://groups.google.com/forum/#!forum/cantera-users).
|
||||
|
||||
**System information**
|
||||
|
||||
- Cantera version: [e.g. 2.4]
|
||||
- OS: [e.g. Windows 10]
|
||||
- Python/MATLAB version:
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Actual behavior**
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Open '...'
|
||||
2. Run '....'
|
||||
3. See error '....'
|
||||
|
||||
**Attachments**
|
||||
|
||||
If applicable, attach scripts and/or input files to help explain your problem.
|
||||
Please do *not* attach screenshots of code or terminal output.
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context about the problem here.
|
||||
25
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest a new feature to enhance Cantera's capabilities
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe**
|
||||
|
||||
A clear and concise description of the problem you're trying to solve.
|
||||
|
||||
**Describe the desired solution**
|
||||
|
||||
A clear and concise description of a new feature and its application. For
|
||||
example, "It would be great if Cantera could..."
|
||||
|
||||
**Describe alternatives you have considered**
|
||||
|
||||
A clear and concise description of any alternative solutions or features you
|
||||
have considered.
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context about the feature request here.
|
||||
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Thanks for contributing code! Please include a description of your change and
|
||||
check your PR against the list below (for further questions, refer to the
|
||||
[contributing guide](https://github.com/Cantera/cantera/blob/master/CONTRIBUTING.md)).
|
||||
|
||||
- [ ] There is a clear use-case for this code change
|
||||
- [ ] The commit message has a short title & references relevant issues
|
||||
- [ ] Build passes (`scons build` & `scons test`) and unit tests address code coverage
|
||||
|
||||
**Please fill in the issue number this pull request is fixing**
|
||||
|
||||
Fixes #
|
||||
|
||||
**Changes proposed in this pull request**
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
38
.github/SUPPORT.md
vendored
Normal file
38
.github/SUPPORT.md
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# How to get support
|
||||
|
||||
> This project has a [Code of Conduct](https://github.com/Cantera/cantera/blob/master/CODE_OF_CONDUCT.md).
|
||||
> By interacting with this repository, organisation, or community you agree to
|
||||
> abide by its terms.
|
||||
|
||||
For **help**, **support** and **questions** please create a post on the
|
||||
**[Cantera Users' Group](https://groups.google.com/group/cantera-users)**.
|
||||
Any discussion of Cantera functionality such as how to use certain function
|
||||
calls, syntax problems, input files, etc. should be directed to the Users' Group.
|
||||
|
||||
Further, the **[Cantera Gitter Chat](https://gitter.im/Cantera/Lobby)** is an
|
||||
infrequently monitored chat room that can be used to discuss tangentially-related
|
||||
topics such as how to model the underlying physics of a problem, share cool
|
||||
applications that you have developed, etc.
|
||||
|
||||
Please **_do not_** raise an issue on GitHub unless it is a bug report or a
|
||||
feature request. Issues that do not fall into these categories will be closed.
|
||||
If you're not sure, please make a post on the
|
||||
[Users' Group](https://groups.google.com/group/cantera-users) and someone will
|
||||
be able to help you out.
|
||||
|
||||
## Documentation
|
||||
|
||||
The [documentation](https://cantera.org/documentation)
|
||||
offers a number of starting points:
|
||||
|
||||
- [Python tutorial](https://cantera.org/tutorials/python-tutorial.html)
|
||||
- [Application Examples in Python (Jupyter)](https://github.com/Cantera/cantera-jupyter#cantera-jupyter)
|
||||
- [A guide to Cantera's input file format](https://cantera.org/tutorials/input-files.html)
|
||||
- [Information about the Cantera community](https://cantera.org/community.html)
|
||||
|
||||
Documentation for the [development version of
|
||||
Cantera](https://cantera.org/documentation/dev-docs.html) is also available.
|
||||
|
||||
## Contributions
|
||||
|
||||
See [`CONTRIBUTING.md`](https://github.com/Cantera/cantera/blob/master/CONTRIBUTING.md) on how to contribute.
|
||||
16
.gitignore
vendored
16
.gitignore
vendored
|
|
@ -1,4 +1,6 @@
|
|||
doc/ctdeploy_key
|
||||
*~
|
||||
*#
|
||||
*.o
|
||||
*.so
|
||||
*.os
|
||||
|
|
@ -40,9 +42,11 @@ config.log
|
|||
*.gch
|
||||
coverage/
|
||||
coverage.info
|
||||
doc/sphinx/cython/examples
|
||||
doc/sphinx/cython/examples.rst
|
||||
doc/sphinx/matlab/examples/
|
||||
doc/sphinx/matlab/examples.rst
|
||||
doc/sphinx/matlab/tutorials/
|
||||
doc/sphinx/matlab/code-docs/
|
||||
doc/sphinx/matlab/data.rst
|
||||
doc/sphinx/matlab/importing.rst
|
||||
doc/sphinx/matlab/kinetics.rst
|
||||
doc/sphinx/matlab/one-dim.rst
|
||||
doc/sphinx/matlab/thermodynamics.rst
|
||||
doc/sphinx/matlab/transport.rst
|
||||
doc/sphinx/matlab/utilities.rst
|
||||
doc/sphinx/matlab/zero-dim.rst
|
||||
|
|
|
|||
5
.gitmodules
vendored
5
.gitmodules
vendored
|
|
@ -9,4 +9,7 @@
|
|||
url = https://github.com/Cantera/sundials-mirror
|
||||
[submodule "ext/eigen"]
|
||||
path = ext/eigen
|
||||
url = https://github.com/Cantera/eigen-mirror.git
|
||||
url = https://github.com/eigenteam/eigen-git-mirror
|
||||
[submodule "ext/yaml-cpp"]
|
||||
path = ext/yaml-cpp
|
||||
url = https://github.com/jbeder/yaml-cpp.git
|
||||
|
|
|
|||
81
.travis.yml
81
.travis.yml
|
|
@ -1,37 +1,90 @@
|
|||
language: cpp
|
||||
sudo: false
|
||||
dist: xenial
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-dev
|
||||
- python-numpy
|
||||
- python-pip
|
||||
- python3-pip
|
||||
- python3-dev
|
||||
- python3-numpy
|
||||
- python3-setuptools
|
||||
- scons
|
||||
- gfortran
|
||||
- libsundials-serial-dev
|
||||
- liblapack-dev
|
||||
- libblas-dev
|
||||
- libboost-dev
|
||||
- doxygen
|
||||
- graphviz
|
||||
ssh_known_hosts:
|
||||
- cantera.org
|
||||
|
||||
env:
|
||||
global:
|
||||
secure: "IqQ4IVKzZbMCIVrD6t3YQDi3mEiswhTWo3AAKg2CrA+CETads/I9d0g68krKCA2xue0zm9pFVWbs5MT2F6Yq2PNsdvoN3ZMHrpXTN2ZJ7pgukgVwNuBe7B/tm6xBzSbZ4KPIanWCu3TNXsZp9EPG1rdhagAZZ+TeDYdIUKAITjYOVIiiAsqiLllsE9cAq3jkiu/JAxB0tzicxERi1RtnMfL/1d9fupP+yrExwIYo+hhAwWwghdiKzh551sowpbVFVxuOtTJfpC+vh1a/kLo/VTr4DDe6Bdkubc7beU8WZiZNVVbNoydy/qYkKuOzmXu9Llo9flMzJKswR7Szxi8nhD2zc+3pOYxJilWPYtrG4WrJr3WFTU3xZg5KsLwNpCane1uAsrj/NNtMagp+Wj1yOBMDMmHF5GAyCVEgSqY2PLISaEPOPCJV4VihaHyie1hM/A5YlD2VwkkKJTjMIP2VpaLVo9Sr3jXUIhtp/wLNleSWENX7etFjVqhwX1ldhz6+gVrn/H6oS2LwHQwlAseE9O6eqAB5ia+9duYDt7JS5F1P8QMYhz1gaJGXKWBnCEur5XHoGhZ75nyNnpmLjDOHKk5NmQQNL6ltUqg3fX7EWOjzxHlymdZ/4lg5AESj/+nBAhJJcAYRn9hHti7JLMjF6Qk/Kf3pJ6qVBHETY2KivH8="
|
||||
|
||||
|
||||
before_script: |
|
||||
pip install --user --install-option="--no-cython-compile" cython
|
||||
pip install --user 3to2
|
||||
echo TRAVIS_OS_NAME: $TRAVIS_OS_NAME
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew update
|
||||
brew install scons
|
||||
brew install boost
|
||||
brew install python3
|
||||
pip3 install numpy
|
||||
export CONDA_ARCH="${TRAVIS_OS_NAME}_${BUILD_ARCH}"
|
||||
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
|
||||
bash miniconda.sh -b -p $HOME/miniconda
|
||||
source $HOME/miniconda/etc/profile.d/conda.sh && conda activate
|
||||
conda config --set always_yes yes --set changeps1 no
|
||||
conda install -q numpy cython scons boost ruamel_yaml
|
||||
conda install -q -c conda-forge openmp
|
||||
else
|
||||
pip3 install --user --upgrade pip
|
||||
pip3 install --user --upgrade setuptools wheel
|
||||
pip3 install --user cython
|
||||
pip3 install --user ruamel.yaml==0.15.94 # Need a version compatible with Python 3.4
|
||||
|
||||
# Install packages for the documentation
|
||||
pip3 install --user sphinx sphinxcontrib-matlabdomain sphinxcontrib-doxylink
|
||||
pip3 install --user https://github.com/hagenw/sphinxcontrib-katex/archive/master.tar.gz
|
||||
fi
|
||||
rm -f cantera.conf
|
||||
script:
|
||||
- scons build -j2 VERBOSE=y python_package=full python3_package=y blas_lapack_libs=lapack,blas optimize=n coverage=y
|
||||
- scons test
|
||||
script: |
|
||||
set -e
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
scons build -j2 python_cmd=/usr/bin/python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y
|
||||
scons test
|
||||
scons samples
|
||||
scons build sphinx_docs=y doxygen_docs=y sphinx_cmd="/usr/bin/python3 `which sphinx-build`"
|
||||
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_REPO_SLUG}" == "Cantera/cantera" ]]; then
|
||||
cd build
|
||||
find docs -type f | grep -v /xml/ | grep -v .map$ | grep -v .md5$ | tar cjvf docs/dev-docs.tar.bz2 --files-from - >/dev/null
|
||||
cd -
|
||||
openssl aes-256-cbc -k "${ctdeploy_pass}" -in ./doc/ctdeploy_key.enc -out ./doc/ctdeploy_key -d
|
||||
chmod 0600 ./doc/ctdeploy_key
|
||||
RSYNC_OPTIONS=(
|
||||
-avzP
|
||||
--checksum
|
||||
--rsh='ssh -i ./doc/ctdeploy_key'
|
||||
--exclude='*.map'
|
||||
--exclude='*.md5'
|
||||
--exclude='/doxygen/xml'
|
||||
--delete
|
||||
--delete-excluded
|
||||
)
|
||||
RSYNC_USER="ctdeploy"
|
||||
RSYNC_SERVER="cantera.org"
|
||||
RSYNC_DEST="cantera/documentation/dev"
|
||||
DOCS_OUTPUT_DIR="./build/docs/"
|
||||
rsync "${RSYNC_OPTIONS[@]}" "${DOCS_OUTPUT_DIR}" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
|
||||
else
|
||||
echo "Skipping documentation upload from source other than Cantera/cantera:master"
|
||||
fi
|
||||
else
|
||||
scons build -j2 python_cmd=python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y extra_inc_dirs=$CONDA_PREFIX/include extra_lib_dirs=$CONDA_PREFIX/lib
|
||||
scons test
|
||||
scons samples
|
||||
fi
|
||||
after_success: |
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
fi
|
||||
|
|
|
|||
28
AUTHORS
28
AUTHORS
|
|
@ -4,16 +4,42 @@ partial, alphabetical list of developers and contributors to Cantera over the
|
|||
years. If you've been left off, please report the omission on the Github issue
|
||||
tracker.
|
||||
|
||||
Emil Atz
|
||||
Philip Berndt
|
||||
Wolfgang Bessler, Offenburg University of Applied Science
|
||||
Tilman Bremer
|
||||
Victor Brunini, Sandia National Laboratory
|
||||
Steven Decaluwe, Colorado School of Mines
|
||||
Bang-Shiuh Chen, Purdue University
|
||||
Ryan Crisanti
|
||||
Nicholas Curtis
|
||||
Steven DeCaluwe, Colorado School of Mines
|
||||
Vishesh Devgan
|
||||
Thomas Fiala, Technische Universität München
|
||||
David Fronczek
|
||||
@g3bk47
|
||||
Matteo Giani
|
||||
Dave Goodwin, California Institute of Technology
|
||||
John Hewson, Sandia National Laboratory
|
||||
Trevor Hickey
|
||||
Yuanjie Jiang
|
||||
Jon Kristofer
|
||||
Kyle Linevitch, Jr.
|
||||
Christopher Leuth
|
||||
Nicholas Malaya, University of Texas at Austin
|
||||
Thanasis Mattas, Aristotle University of Thessaloniki
|
||||
Evan McCorkle
|
||||
Ivan Mitrichev, Mendeleev University of Chemical Technology of Russia
|
||||
Harry Moffat, Sandia National Laboratory
|
||||
Christopher Neal
|
||||
Kyle Niemeyer, Oregon State University
|
||||
Paul Northrop
|
||||
Andreas Rücker
|
||||
Jeff Santner
|
||||
Satyam Saxena
|
||||
Ingmar Schoegl, Louisiana State University
|
||||
Santosh Shanbhogue, Massachusetts Institute of Technology
|
||||
David Sondak
|
||||
Raymond Speth, Massachusetts Institute of Technology
|
||||
Sergey Torokhov
|
||||
Bryan Weber, University of Connecticut
|
||||
Armin Wehrfritz
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
followed by a blank line and a more detailed summary, if any)
|
||||
* Make related changes in a single commit, and unrelated changes in separate
|
||||
commits
|
||||
* Make sure that your commits do not include any undesired files, e.g. files
|
||||
* Make sure that your commits do not include any undesired files, e.g., files
|
||||
produced as part of the build process or other temporary files.
|
||||
* Use Git's history-rewriting features (i.e. `git rebase -i`; see
|
||||
* Use Git's history-rewriting features (i.e., `git rebase -i`; see
|
||||
https://help.github.com/articles/about-git-rebase/) to organize your commits
|
||||
and squash "fixup" commits and reversions.
|
||||
* Do not merge your branch with `master`. If needed, you should rebase your branch
|
||||
|
|
@ -33,7 +33,8 @@
|
|||
integration tests run using Travis and AppVeyor and resolve any issues that
|
||||
arise.
|
||||
* Additional discussion of good Git & Github workflow is provided at
|
||||
http://matplotlib.org/devel/gitwash/development_workflow.html and https://docs.scipy.org/doc/numpy-dev/dev/index.html
|
||||
http://matplotlib.org/devel/gitwash/development_workflow.html and
|
||||
https://docs.scipy.org/doc/numpy-1.15.0/dev/gitwash/development_workflow.html
|
||||
* Cantera is licensed under a [BSD
|
||||
license](https://github.com/Cantera/cantera/blob/master/License.txt) which
|
||||
allows others to freely modify the code, and if your Pull Request is accepted,
|
||||
|
|
@ -52,8 +53,9 @@
|
|||
* Write comments to explain non-obvious operations
|
||||
|
||||
## C++
|
||||
|
||||
* All classes, member variables, and methods should have Doxygen-style comments
|
||||
(e.g. comment lines starting with `//!` or comment blocks starting with `/*!`)
|
||||
(e.g., comment lines starting with `//!` or comment blocks starting with `/*!`)
|
||||
* Avoid defining non-trivial functions in header files
|
||||
* Header files should include an 'include guard'
|
||||
* Protected and private member variable names are generally prefixed with
|
||||
|
|
@ -70,7 +72,10 @@
|
|||
`std::shared_ptr` when dynamic allocation is required.
|
||||
* Portions of Boost which are "header only" may be used. If possible, include
|
||||
Boost header files only within .cpp files rather than other header files to
|
||||
avoid unnecessary increases in compilation time.
|
||||
avoid unnecessary increases in compilation time. Boost should not be added
|
||||
to the public interface unless its existence and use is optional. This keeps
|
||||
the number of dependencies low for users of Cantera. In these cases,
|
||||
`CANTERA_API_NO_BOOST` should be used to conditionally remove Boost dependencies.
|
||||
* While Cantera does not specifically follow these rules, the following style
|
||||
guides are useful references for possible style choices and the rationales behind them.
|
||||
* The Google C++ Style Guide: https://google.github.io/styleguide/cppguide.html
|
||||
|
|
@ -82,7 +87,7 @@
|
|||
## Python
|
||||
|
||||
* Style generally follows PEP8 (https://www.python.org/dev/peps/pep-0008/)
|
||||
* Code in .py files needs to be written to work with both Python 2
|
||||
and Python 3. Code in Cython files (.pyx or .pxd) should automatically work with both.
|
||||
* Code in the Python examples should be written for Python 3. Python 2 versions
|
||||
are automatically generated as part of the build process
|
||||
* Code in `.py` and `.pyx` files needs to be written to work with Python 3
|
||||
* The minimum Python version that Cantera supports is Python 3.4, so code should only use features added in Python 3.4 or earlier
|
||||
* Code in `ctml_writer.py` and `ck2cti.py` needs to be written to work with both Python 2 and Python 3
|
||||
* Code in the Python examples should be written for Python 3
|
||||
|
|
|
|||
3
INSTALL
3
INSTALL
|
|
@ -18,5 +18,4 @@ shown by running `scons` with no other arguments.
|
|||
Detailed Instructions
|
||||
---------------------
|
||||
|
||||
See the file `doc/sphinx/compiling.rst` or the HTML instructions
|
||||
available at http://cantera.github.com/docs/sphinx/html/compiling.html.
|
||||
See the instructions available at [online](https://cantera.org/install/index.html)
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
### Cantera version
|
||||
|
||||
### Operating System
|
||||
|
||||
### Python/MATLAB version
|
||||
|
||||
### Expected Behavior
|
||||
|
||||
### Actual Behavior
|
||||
|
||||
### Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
|
@ -6,7 +6,7 @@ Copyright (c) 2009 Sandia Corporation. Under the terms of
|
|||
Contract AC04-94AL85000 with Sandia Corporation, the U.S. Government
|
||||
retains certain rights in this software.
|
||||
|
||||
Copyright (c) 2011-2017, Cantera Developers.
|
||||
Copyright (c) 2011-2018, Cantera Developers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
Fixes # .
|
||||
|
||||
Changes proposed in this pull request:
|
||||
-
|
||||
-
|
||||
-
|
||||
139
README.rst
139
README.rst
|
|
@ -1,19 +1,16 @@
|
|||
.. Cantera
|
||||
|
||||
*******
|
||||
Cantera
|
||||
*******
|
||||
|cantera|
|
||||
|
||||
Version 2.3.0 (stable)
|
||||
|doi| |codecov| |travisci| |appveyor| |release|
|
||||
|
||||
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.170284.svg
|
||||
:target: https://doi.org/10.5281/zenodo.170284
|
||||
|
||||
What is Cantera?
|
||||
================
|
||||
|
||||
Cantera is an open-source collection of object-oriented software tools for
|
||||
problems involving chemical kinetics, thermodynamics, and transport
|
||||
processes. Among other things, it can be used to:
|
||||
problems involving chemical kinetics, thermodynamics, and transport processes.
|
||||
Among other things, it can be used to:
|
||||
|
||||
* Evaluate thermodynamic and transport properties of mixtures
|
||||
* Compute chemical equilibrium
|
||||
|
|
@ -28,73 +25,72 @@ Cantera can be used from Python and Matlab, or in applications written in C++
|
|||
and Fortran 90. A number of `examples of Cantera's capabilities
|
||||
<https://github.com/Cantera/cantera-jupyter>`_ are available in the form of
|
||||
Jupyter notebooks. These examples can be tried interactively, in the cloud by
|
||||
using the following Binder link:
|
||||
using the following MyBinder link:
|
||||
|
||||
.. image:: http://mybinder.org/badge.svg
|
||||
:target: http://mybinder.org:/repo/cantera/cantera-jupyter
|
||||
.. image:: https://mybinder.org/badge.svg
|
||||
:target: https://mybinder.org/repo/cantera/cantera-jupyter
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
`Installation instructions for the current release of Cantera
|
||||
<http://cantera.github.io/docs/sphinx/html/install.html>`_ are available from
|
||||
the main `Cantera documentation site
|
||||
<http://cantera.github.io/docs/sphinx/html/index.html>`_. Installers are
|
||||
provided for Windows (MSI packages), Mac OS X (through Homebrew), and
|
||||
Ubuntu. Anaconda packages containing the Cantera Python module are also
|
||||
available for Windows, OS X, and Linux.
|
||||
<https://cantera.org/install/index.html>`_ are available from the main `Cantera
|
||||
documentation site <https://cantera.org>`_. Installers are provided for Windows
|
||||
(MSI packages), macOS (through Homebrew), and Ubuntu. Anaconda packages
|
||||
containing the Cantera Python module are also available for Windows, macOS, and
|
||||
Linux.
|
||||
|
||||
.. image:: https://anaconda.org/cantera/cantera/badges/installer/conda.svg
|
||||
:target: https://anaconda.org/Cantera/cantera
|
||||
|
||||
For other platforms, or for users wishing to install a development version of
|
||||
Cantera, `compilation instructions
|
||||
<http://cantera.github.io/docs/sphinx/html/compiling.html>`_ are also available.
|
||||
Cantera, `compilation instructions <https://cantera.org/install/index.html>`_
|
||||
are also available.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The `documentation <http://cantera.github.io/docs/sphinx/html/index.html>`_
|
||||
The `documentation <https://cantera.org/documentation>`_
|
||||
offers a number of starting points:
|
||||
|
||||
- `Python tutorial
|
||||
<http://cantera.github.io/docs/sphinx/html/cython/tutorial.html>`_
|
||||
<https://cantera.org/tutorials/python-tutorial.html>`_
|
||||
- `Application Examples in Python
|
||||
<https://github.com/Cantera/cantera-jupyter#cantera-jupyter>`_
|
||||
- `A guide to Cantera's input file format
|
||||
<http://cantera.github.io/docs/sphinx/html/cti/index.html>`_
|
||||
- `A list of frequently asked questions
|
||||
<http://cantera.github.io/docs/sphinx/html/faq.html>`_
|
||||
<https://cantera.org/tutorials/input-files.html>`_
|
||||
- `Information about the Cantera community
|
||||
<https://cantera.org/community.html>`_
|
||||
|
||||
`Documentation for the development version of Cantera
|
||||
<http://cantera.github.com/dev-docs/sphinx/html/index.html>`_ is also available.
|
||||
<https://cantera.org/documentation/dev-docs.html>`_ is also available.
|
||||
|
||||
Code of Conduct
|
||||
===============
|
||||
|
||||
.. image:: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square
|
||||
:alt: conduct
|
||||
:target: http://contributor-covenant.org/version/1/4/
|
||||
:target: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
In order to have a more open and welcoming community, Cantera adheres to a
|
||||
`code of conduct <CODE_OF_CONDUCT.md>`_ adapted from the `Contributor Covenent
|
||||
code of conduct <http://contributor-covenant.org/>`_.
|
||||
code of conduct <https://contributor-covenant.org/>`_.
|
||||
|
||||
Please adhere to this code of conduct in any interactions you have in the
|
||||
Cantera community. It is strictly enforced on all official Cantera
|
||||
repositories, websites, users' group, and other resources.
|
||||
If you encounter someone violating these terms, please
|
||||
`contact the code of conduct team <mailto:conduct@cantera.org>`_
|
||||
(`@speth <https://github.com/speth>`_,
|
||||
`@bryanwweber <https://github.com/bryanwweber>`_, and
|
||||
`@kyleniemeyer <https://github.com/kyleniemeyer>`_)
|
||||
and we will address it as soon as possible.
|
||||
repositories, websites, users' group, and other resources. If you encounter
|
||||
someone violating these terms, please `contact the code of conduct team
|
||||
<mailto:conduct@cantera.org>`_ (`@speth <https://github.com/speth>`_,
|
||||
`@bryanwweber <https://github.com/bryanwweber>`_, and `@kyleniemeyer
|
||||
<https://github.com/kyleniemeyer>`_) and we will address it as soon as
|
||||
possible.
|
||||
|
||||
Development Site
|
||||
================
|
||||
|
||||
The `latest Cantera source code <https://github.com/Cantera/cantera>`_, the
|
||||
`issue tracker <https://github.com/Cantera/cantera/issues>`_ for bugs and
|
||||
The current development version is 2.5.0a3. The current stable version is
|
||||
2.4.0. The `latest Cantera source code <https://github.com/Cantera/cantera>`_,
|
||||
the `issue tracker <https://github.com/Cantera/cantera/issues>`_ for bugs and
|
||||
enhancement requests, `downloads of Cantera releases and binary installers
|
||||
<https://github.com/Cantera/cantera/releases>`_ , and the `Cantera wiki
|
||||
<https://github.com/Cantera/cantera/wiki>`_ can all be found on Github.
|
||||
|
|
@ -102,18 +98,77 @@ enhancement requests, `downloads of Cantera releases and binary installers
|
|||
Users' Group
|
||||
============
|
||||
|
||||
The `Cantera Users' Group <http://groups.google.com/group/cantera-users>`_ is a
|
||||
The `Cantera Users' Group <https://groups.google.com/group/cantera-users>`_ is a
|
||||
message board / mailing list for discussions amongst Cantera users.
|
||||
|
||||
Cantera Gitter Chat
|
||||
===================
|
||||
|
||||
.. image:: https://badges.gitter.im/org.png
|
||||
:target: https://gitter.im/Cantera/Lobby
|
||||
|
||||
|
||||
The `Cantera Gitter Chat <https://gitter.im/Cantera/Lobby>`_ is a public chat
|
||||
client that is linked to users' Github account. The developers do not closely
|
||||
monitor the discussion, so *any* discussion at all of Cantera functionality
|
||||
such as how to use certain function calls, syntax problems, input files, etc.
|
||||
should be directed the User's Group. All conversations in the Gitter room will
|
||||
be covered under the Cantera Code of Conduct, so please be nice.
|
||||
|
||||
The chat room is a place to strengthen and develop the Cantera community,
|
||||
discuss tangentially-related topics such as how to model the underlying physics
|
||||
of a problem , share cool applications you’ve developed, etc.
|
||||
|
||||
Summary:
|
||||
|
||||
“How do I perform this Cantera function call?” --> User's Group
|
||||
|
||||
"What do I do with the variables that a Cantera function call returns?” -->
|
||||
Chat
|
||||
|
||||
|
||||
Continuous Integration Status
|
||||
=============================
|
||||
|
||||
Travis builds (Linux & OS X):
|
||||
============== ============ ===================
|
||||
Platform Site Status
|
||||
============== ============ ===================
|
||||
Linux & OS X Travis CI |travisci|
|
||||
Windows x64 Appveyor |appveyor|
|
||||
============== ============ ===================
|
||||
|
||||
.. image:: https://travis-ci.org/Cantera/cantera.svg?branch=master
|
||||
|
||||
NumFOCUS
|
||||
========
|
||||
|
||||
Cantera is a fiscally-sponsored project of `NumFOCUS <https://numfocus.org>`__,
|
||||
a non-profit dedicated to supporting the open source scientific computing
|
||||
community. Please consider `making a donation
|
||||
<https://numfocus.salsalabs.org/donate-to-cantera/index.html>`__ to support the
|
||||
development of Cantera through NumFOCUS.
|
||||
|
||||
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
|
||||
:target: https://numfocus.salsalabs.org/donate-to-cantera/index.html
|
||||
:alt: Powered by NumFOCUS
|
||||
|
||||
.. |cantera| image:: https://cantera.org/assets/img/cantera-logo.png
|
||||
:target: https://cantera.org
|
||||
:alt: cantera logo
|
||||
:width: 675px
|
||||
:align: middle
|
||||
|
||||
.. |travisci| image:: https://travis-ci.org/Cantera/cantera.svg?branch=master
|
||||
:target: https://travis-ci.org/Cantera/cantera
|
||||
|
||||
Appveyor builds (Windows):
|
||||
|
||||
.. image:: https://ci.appveyor.com/api/projects/status/auhd35qn9cdmkpoj?svg=true
|
||||
.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/auhd35qn9cdmkpoj?svg=true
|
||||
:target: https://ci.appveyor.com/project/Cantera/cantera
|
||||
|
||||
.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.170284.svg
|
||||
:target: https://doi.org/10.5281/zenodo.1174508
|
||||
|
||||
.. |codecov| image:: https://img.shields.io/codecov/c/github/Cantera/cantera/master.svg
|
||||
:target: https://codecov.io/gh/Cantera/cantera?branch=master
|
||||
|
||||
.. |release| image:: https://img.shields.io/github/release/cantera/cantera.svg
|
||||
:target: https://github.com/Cantera/cantera/releases
|
||||
:alt: GitHub release
|
||||
|
|
|
|||
983
SConstruct
983
SConstruct
File diff suppressed because it is too large
Load diff
20
appveyor.yml
20
appveyor.yml
|
|
@ -1,20 +1,22 @@
|
|||
version: 1.0.{build}
|
||||
install:
|
||||
- ps: |
|
||||
C:\Python27-x64\python.exe -m pip install --upgrade pip
|
||||
C:\Python27-x64\Scripts\pip.exe install --egg scons
|
||||
C:\Python27-x64\Scripts\pip.exe install numpy
|
||||
C:\Python27-x64\Scripts\pip.exe install cython
|
||||
C:\Python27-x64\Scripts\pip.exe install 3to2
|
||||
C:\Python27-x64\Scripts\pip.exe install pypiwin32
|
||||
C:\Python35-x64\Scripts\pip.exe install numpy
|
||||
C:\Python37-x64\python.exe -m pip install --no-cache-dir --upgrade pip
|
||||
C:\Python37-x64\python.exe -m pip install --upgrade setuptools
|
||||
C:\Python37-x64\python.exe -m pip install --upgrade --no-warn-script-location wheel
|
||||
C:\Python37-x64\Scripts\pip.exe install scons==3.0.1
|
||||
C:\Python37-x64\Scripts\pip.exe install --no-cache-dir --no-warn-script-location numpy
|
||||
C:\Python37-x64\Scripts\pip.exe install --no-warn-script-location cython
|
||||
C:\Python37-x64\Scripts\pip.exe install pypiwin32
|
||||
C:\Python37-x64\Scripts\pip.exe install ruamel.yaml
|
||||
|
||||
build_script:
|
||||
- cmd: C:\Python27-x64\scons build -j2 boost_inc_dir=C:\Libraries\boost_1_62_0 debug=n VERBOSE=y python3_cmd=C:\Python35-x64\python.exe
|
||||
- cmd: C:\Python37-x64\Scripts\scons build -j2 boost_inc_dir=C:\Libraries\boost_1_62_0 debug=n VERBOSE=y python_package=full
|
||||
- cmd: C:\Python37-x64\Scripts\scons samples
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
C:\Python27-x64\scons test
|
||||
C:\Python37-x64\Scripts\scons test
|
||||
$sconsstatus = $lastexitcode
|
||||
$wc = New-Object 'System.Net.WebClient'
|
||||
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test\work\gtest-general.xml))
|
||||
|
|
|
|||
|
|
@ -4,6 +4,41 @@ END
|
|||
SPECIES
|
||||
O O2 N NO NO2 N2O N2 AR
|
||||
END
|
||||
THERMO ALL
|
||||
300.000 1000.000 5000.000
|
||||
O L 1/90O 1 00 00 00G 200.000 3500.000 1000.000 1
|
||||
2.56942078E+00-8.59741137E-05 4.19484589E-08-1.00177799E-11 1.22833691E-15 2
|
||||
2.92175791E+04 4.78433864E+00 3.16826710E+00-3.27931884E-03 6.64306396E-06 3
|
||||
-6.12806624E-09 2.11265971E-12 2.91222592E+04 2.05193346E+00 4
|
||||
O2 TPIS89O 2 00 00 00G 200.000 3500.000 1000.000 1
|
||||
3.28253784E+00 1.48308754E-03-7.57966669E-07 2.09470555E-10-2.16717794E-14 2
|
||||
-1.08845772E+03 5.45323129E+00 3.78245636E+00-2.99673416E-03 9.84730201E-06 3
|
||||
-9.68129509E-09 3.24372837E-12-1.06394356E+03 3.65767573E+00 4
|
||||
N L 6/88N 1 0 0 0G 200.000 6000.000 1000.000 1
|
||||
0.24159429E+01 0.17489065E-03-0.11902369E-06 0.30226245E-10-0.20360982E-14 2
|
||||
0.56133773E+05 0.46496096E+01 0.25000000E+01 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00 0.56104637E+05 0.41939087E+01 4
|
||||
NO RUS 78N 1O 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.32606056E+01 0.11911043E-02-0.42917048E-06 0.69457669E-10-0.40336099E-14 2
|
||||
0.99209746E+04 0.63693027E+01 0.42184763E+01-0.46389760E-02 0.11041022E-04 3
|
||||
-0.93361354E-08 0.28035770E-11 0.98446230E+04 0.22808464E+01 4
|
||||
NO2 L 7/88N 1O 2 0 0G 200.000 6000.000 1000.000 1
|
||||
0.48847542E+01 0.21723956E-02-0.82806906E-06 0.15747510E-09-0.10510895E-13 2
|
||||
0.23164983E+04-0.11741695E+00 0.39440312E+01-0.15854290E-02 0.16657812E-04 3
|
||||
-0.20475426E-07 0.78350564E-11 0.28966179E+04 0.63119917E+01 4
|
||||
N2O L 7/88N 2O 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.48230729E+01 0.26270251E-02-0.95850874E-06 0.16000712E-09-0.97752303E-14 2
|
||||
0.80734048E+04-0.22017207E+01 0.22571502E+01 0.11304728E-01-0.13671319E-04 3
|
||||
0.96819806E-08-0.29307182E-11 0.87417744E+04 0.10757992E+02 4
|
||||
N2 121286N 2 G 300.000 5000.000 1000.000 1
|
||||
0.02926640E+02 0.14879768E-02-0.05684760E-05 0.10097038E-09-0.06753351E-13 2
|
||||
-0.09227977E+04 0.05980528E+02 0.03298677E+02 0.14082404E-02-0.03963222E-04 3
|
||||
0.05641515E-07-0.02444854E-10-0.10208999E+04 0.03950372E+02 4
|
||||
AR 120186AR 1 G 300.000 5000.000 1000.000 1
|
||||
0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2
|
||||
-0.07453750E+04 0.04366000E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00-0.07453750E+04 0.04366000E+02 4
|
||||
END
|
||||
REACTIONS
|
||||
2O+M<=>O2+M 1.200E+17 -1.000 .00
|
||||
AR/.83/
|
||||
|
|
|
|||
|
|
@ -1,317 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
<validate reactions="yes" species="yes"/>
|
||||
|
||||
<!-- phase airNASA9 -->
|
||||
<phase dim="3" id="airNASA9">
|
||||
<elementArray datasrc="elements.xml">O N E </elementArray>
|
||||
<speciesArray datasrc="#species_data">
|
||||
N2 O2 NO N O N2+ O2+ NO+ N+ O+
|
||||
e- </speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="None"/>
|
||||
</phase>
|
||||
|
||||
<!-- species definitions -->
|
||||
<speciesData id="species_data">
|
||||
|
||||
<!-- species N2 -->
|
||||
<species name="N2">
|
||||
<atomArray>N:2 </atomArray>
|
||||
<note>Ref-Elm. Gurvich,1978 pt1 p280 pt2 p207. </note>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
2.210371497E+04, -3.818461820E+02, 6.082738360E+00, -8.530914410E-03,
|
||||
1.384646189E-05, -9.625793620E-09, 2.519705809E-12, 7.108460860E+02,
|
||||
-1.076003744E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
5.877124060E+05, -2.239249073E+03, 6.066949220E+00, -6.139685500E-04,
|
||||
1.491806679E-07, -1.923105485E-11, 1.061954386E-15, 1.283210415E+04,
|
||||
-1.586640027E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
8.310139160E+08, -6.420733540E+05, 2.020264635E+02, -3.065092046E-02,
|
||||
2.486903333E-06, -9.705954110E-11, 1.437538881E-15, 4.938707040E+06,
|
||||
-1.672099740E+03</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O2 -->
|
||||
<species name="O2">
|
||||
<atomArray>O:2 </atomArray>
|
||||
<note>Ref-Elm. Gurvich,1989 pt1 p94 pt2 p9. </note>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-3.425563420E+04, 4.847000970E+02, 1.119010961E+00, 4.293889240E-03,
|
||||
-6.836300520E-07, -2.023372700E-09, 1.039040018E-12, -3.391454870E+03,
|
||||
1.849699470E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-1.037939022E+06, 2.344830282E+03, 1.819732036E+00, 1.267847582E-03,
|
||||
-2.188067988E-07, 2.053719572E-11, -8.193467050E-16, -1.689010929E+04,
|
||||
1.738716506E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
4.975294300E+08, -2.866106874E+05, 6.690352250E+01, -6.169959020E-03,
|
||||
3.016396027E-07, -7.421416600E-12, 7.278175770E-17, 2.293554027E+06,
|
||||
-5.530621610E+02</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species NO -->
|
||||
<species name="NO">
|
||||
<atomArray>O:1 N:1 </atomArray>
|
||||
<note>Gurvich,1978,1989 pt1 p326 pt2 p203. </note>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-1.143916503E+04, 1.536467592E+02, 3.431468730E+00, -2.668592368E-03,
|
||||
8.481399120E-06, -7.685111050E-09, 2.386797655E-12, 9.098214410E+03,
|
||||
6.728725490E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
2.239018716E+05, -1.289651623E+03, 5.433936030E+00, -3.656034900E-04,
|
||||
9.880966450E-08, -1.416076856E-11, 9.380184620E-16, 1.750317656E+04,
|
||||
-8.501669090E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-9.575303540E+08, 5.912434480E+05, -1.384566826E+02, 1.694339403E-02,
|
||||
-1.007351096E-06, 2.912584076E-11, -3.295109350E-16, -4.677501240E+06,
|
||||
1.242081216E+03</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species N -->
|
||||
<species name="N">
|
||||
<atomArray>N:1 </atomArray>
|
||||
<note>Hf:Cox,1989. Moore,1975. Gordon,1999. </note>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
0.000000000E+00, 0.000000000E+00, 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00, 5.610463780E+04,
|
||||
4.193905036E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
8.876501380E+04, -1.071231500E+02, 2.362188287E+00, 2.916720081E-04,
|
||||
-1.729515100E-07, 4.012657880E-11, -2.677227571E-15, 5.697351330E+04,
|
||||
4.865231506E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
5.475181050E+08, -3.107574980E+05, 6.916782740E+01, -6.847988130E-03,
|
||||
3.827572400E-07, -1.098367709E-11, 1.277986024E-16, 2.550585618E+06,
|
||||
-5.848769753E+02</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O -->
|
||||
<species name="O">
|
||||
<atomArray>O:1 </atomArray>
|
||||
<note>D0(O2):Brix,1954. Moore,1976. Gordon,1999. </note>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-7.953611300E+03, 1.607177787E+02, 1.966226438E+00, 1.013670310E-03,
|
||||
-1.110415423E-06, 6.517507500E-10, -1.584779251E-13, 2.840362437E+04,
|
||||
8.404241820E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
2.619020262E+05, -7.298722030E+02, 3.317177270E+00, -4.281334360E-04,
|
||||
1.036104594E-07, -9.438304330E-12, 2.725038297E-16, 3.392428060E+04,
|
||||
-6.679585350E-01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
1.779004264E+08, -1.082328257E+05, 2.810778365E+01, -2.975232262E-03,
|
||||
1.854997534E-07, -5.796231540E-12, 7.191720164E-17, 8.890942630E+05,
|
||||
-2.181728151E+02</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species N2+ -->
|
||||
<species name="N2+">
|
||||
<atomArray>E:-1 N:2 </atomArray>
|
||||
<note>Gurvich,1989 pt1 p323 pt2 p200. </note>
|
||||
<charge>1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-3.474047470E+04, 2.696222703E+02, 3.164916370E+00, -2.132239781E-03,
|
||||
6.730476400E-06, -5.637304970E-09, 1.621756000E-12, 1.790004424E+05,
|
||||
6.832974166E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-2.845599002E+06, 7.058893030E+03, -2.884886385E+00, 3.068677059E-03,
|
||||
-4.361652310E-07, 2.102514545E-11, 5.411996470E-16, 1.340388483E+05,
|
||||
5.090897022E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-3.712829770E+08, 3.139287234E+05, -9.603518050E+01, 1.571193286E-02,
|
||||
-1.175065525E-06, 4.144441230E-11, -5.621893090E-16, -2.217361867E+06,
|
||||
8.436270947E+02</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O2+ -->
|
||||
<species name="O2+">
|
||||
<atomArray>E:-1 O:2 </atomArray>
|
||||
<note>Gurvich,1989 pt1 p98 pt2 p11. </note>
|
||||
<charge>1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-8.607205450E+04, 1.051875934E+03, -5.432380470E-01, 6.571166540E-03,
|
||||
-3.274263750E-06, 5.940645340E-11, 3.238784790E-13, 1.345544668E+05,
|
||||
2.902709750E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
7.384654880E+04, -8.459559540E+02, 4.985164160E+00, -1.611010890E-04,
|
||||
6.427083990E-08, -1.504939874E-11, 1.578465409E-15, 1.446321044E+05,
|
||||
-5.811230650E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-1.562125524E+09, 1.161406778E+06, -3.302504720E+02, 4.710937520E-02,
|
||||
-3.354461380E-06, 1.167968599E-10, -1.589754791E-15, -8.857866270E+06,
|
||||
2.852035602E+03</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species NO+ -->
|
||||
<species name="NO+">
|
||||
<atomArray>E:-1 O:1 N:1 </atomArray>
|
||||
<note>Cp,S,IP(NO): Gurvich,1989 pt1 p330 pt2 p205. </note>
|
||||
<charge>1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
1.398106635E+03, -1.590446941E+02, 5.122895400E+00, -6.394388620E-03,
|
||||
1.123918342E-05, -7.988581260E-09, 2.107383677E-12, 1.187495132E+05,
|
||||
-4.398433810E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
6.069876900E+05, -2.278395427E+03, 6.080324670E+00, -6.066847580E-04,
|
||||
1.432002611E-07, -1.747990522E-11, 8.935014060E-16, 1.322709615E+05,
|
||||
-1.519880037E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
2.676400347E+09, -1.832948690E+06, 5.099249390E+02, -7.113819280E-02,
|
||||
5.317659880E-06, -1.963208212E-10, 2.805268230E-15, 1.443308939E+07,
|
||||
-4.324044462E+03</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species N+ -->
|
||||
<species name="N+">
|
||||
<atomArray>E:-1 N:1 </atomArray>
|
||||
<note>Moore,1975. Gordon,1999. </note>
|
||||
<charge>1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
5.237079210E+03, 2.299958315E+00, 2.487488821E+00, 2.737490756E-05,
|
||||
-3.134447576E-08, 1.850111332E-11, -4.447350984E-15, 2.256284738E+05,
|
||||
5.076830786E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
2.904970374E+05, -8.557908610E+02, 3.477389290E+00, -5.288267190E-04,
|
||||
1.352350307E-07, -1.389834122E-11, 5.046166279E-16, 2.310809984E+05,
|
||||
-1.994146545E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
1.646092148E+07, -1.113165218E+04, 4.976986640E+00, -2.005393583E-04,
|
||||
1.022481356E-08, -2.691430863E-13, 3.539931593E-18, 3.136284696E+05,
|
||||
-1.706646380E+01</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species O+ -->
|
||||
<species name="O+">
|
||||
<atomArray>E:-1 O:1 </atomArray>
|
||||
<note>Martin,W.C.,1993. Gordon,1999. </note>
|
||||
<charge>1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
0.000000000E+00, 0.000000000E+00, 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00, 1.879352842E+05,
|
||||
4.393376760E+00</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-2.166513208E+05, 6.665456150E+02, 1.702064364E+00, 4.714992810E-04,
|
||||
-1.427131823E-07, 2.016595903E-11, -9.107157762E-16, 1.837191966E+05,
|
||||
1.005690382E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
-2.143835383E+08, 1.469518523E+05, -3.680864540E+01, 5.036164540E-03,
|
||||
-3.087873854E-07, 9.186834870E-12, -1.074163268E-16, -9.614208960E+05,
|
||||
3.426193080E+02</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species e- -->
|
||||
<species name="e-">
|
||||
<atomArray>E:1 </atomArray>
|
||||
<note>Ref-Species. Chase,1998 3/82. </note>
|
||||
<charge>-1</charge>
|
||||
<thermo>
|
||||
<NASA9 Tmax="1000.0" Tmin="298.14999999999998" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
0.000000000E+00, 0.000000000E+00, 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
-1.172081224E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
0.000000000E+00, 0.000000000E+00, 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
-1.172081224E+01</floatArray>
|
||||
</NASA9>
|
||||
<NASA9 Tmax="20000.0" Tmin="6000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="9">
|
||||
0.000000000E+00, 0.000000000E+00, 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
-1.172081224E+01</floatArray>
|
||||
</NASA9>
|
||||
</thermo>
|
||||
</species>
|
||||
</speciesData>
|
||||
<reactionData id="reaction_data"/>
|
||||
</ctml>
|
||||
6276
data/inputs/critProperties.xml
Normal file
6276
data/inputs/critProperties.xml
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,96 +1,107 @@
|
|||
# simplified version of Harris and Goodwin diamond (100) growth
|
||||
# mechanism, J. Phys. Chem., 1993.
|
||||
|
||||
# Trough mechanism from 'S. J. Harris and D. G. Goodwin, 'Growth on
|
||||
# the reconstructed diamond (100) surface, 'J. Phys. Chem. vol. 97,
|
||||
# 23-28 (1993). reactions a - t are taken directly from Table II,
|
||||
# with thermochemistry from Table IV. Reaction u is added here.
|
||||
|
||||
|
||||
units(length = 'cm', quantity = 'mol', act_energy = 'kcal/mol')
|
||||
|
||||
#------------- the gas -------------------------------------
|
||||
|
||||
ideal_gas(name = 'gas',
|
||||
elements = 'H C',
|
||||
species = 'gri30: H H2 CH3 CH4',
|
||||
initial_state = state(temperature = 1200.0,
|
||||
pressure = 1.0e3,
|
||||
mole_fractions = 'H:0.002, H2:1, CH4:0.01, CH3:0.0002'))
|
||||
initial_state = state(
|
||||
temperature = 1200.0,
|
||||
pressure = 20.0 * OneAtm / 760.0,
|
||||
mole_fractions = 'H:0.002, H2:0.988, CH3:0.0002, CH4:0.01',
|
||||
)
|
||||
)
|
||||
|
||||
#------------- bulk diamond -------------------------------------
|
||||
|
||||
stoichiometric_solid(name = 'diamond',
|
||||
elements = 'C',
|
||||
density = (3.52, 'g/cm3'),
|
||||
species = 'C(d)')
|
||||
elements = 'C',
|
||||
density = (3.52, 'g/cm3'),
|
||||
species = 'C(d)')
|
||||
|
||||
species(name = 'C(d)',
|
||||
atoms = 'C:1') # no thermo needed (reaction is irreversible)
|
||||
|
||||
#------------- the diamond surface -------------------------------------
|
||||
|
||||
ideal_interface(name = 'diamond_100',
|
||||
elements = 'H C',
|
||||
species = 'c6HH c6H* c6*H c6** c6HM c6HM* c6*M c6B ',
|
||||
reactions = 'all',
|
||||
phases = 'gas diamond',
|
||||
site_density = (3.0e-9, 'mol/cm2'),
|
||||
site_density = (3.0E-9, 'mol/cm2'),
|
||||
initial_state = state(temperature = 1200.0,
|
||||
coverages = 'c6H*:0.1, c6HH:0.9'))
|
||||
|
||||
species(name = 'C(d)',
|
||||
atoms = 'C:1',
|
||||
thermo = const_cp() )
|
||||
|
||||
# an empty surface site
|
||||
species(name = 'c6H*',
|
||||
atoms = 'H:1',
|
||||
thermo = const_cp(h0 = (51.7, 'kcal/mol'), s0 = (19.5, 'cal/mol/K') ) )
|
||||
thermo = const_cp(h0 = (51.7, 'kcal/mol'),
|
||||
s0 = (19.5, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6*H',
|
||||
atoms = 'H:1',
|
||||
thermo = const_cp(h0 = (46.1, 'kcal/mol'), s0 = (19.9, 'cal/mol/K') ) )
|
||||
thermo = const_cp(h0 = (46.1, 'kcal/mol'),
|
||||
s0 = (19.9, 'cal/mol/K')))
|
||||
|
||||
# a hydrogen-terminated site
|
||||
species(name = 'c6HH',
|
||||
atoms = 'H:2',
|
||||
thermo = const_cp(t0 = 1200.0, h0 = (11.4, 'kcal/mol'),
|
||||
s0 = (21.0, 'cal/mol/K'))
|
||||
)
|
||||
thermo = const_cp(h0 = (11.4, 'kcal/mol'),
|
||||
s0 = (21.0, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6HM',
|
||||
atoms = 'C:1 H:4',
|
||||
thermo = const_cp(h0 = (26.9, 'kcal/mol'),
|
||||
s0 = (40.3, 'cal/mol/K') )
|
||||
)
|
||||
s0 = (40.3, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6HM*',
|
||||
atoms = 'C:1 H:3',
|
||||
thermo = const_cp(h0 = (65.8, 'kcal/mol'),
|
||||
s0 = (40.1, 'cal/mol/K') )
|
||||
)
|
||||
s0 = (40.1, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6*M',
|
||||
atoms = 'C:1 H:3',
|
||||
thermo = const_cp(h0 = (53.3, 'kcal/mol'),
|
||||
s0 = (38.9, 'cal/mol/K') )
|
||||
)
|
||||
s0 = (38.9, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6**',
|
||||
atoms = 'C:0',
|
||||
thermo = const_cp(h0 = (90.0, 'kcal/mol'),
|
||||
s0 = (18.4, 'cal/mol/K') )
|
||||
)
|
||||
s0 = (18.4, 'cal/mol/K')))
|
||||
|
||||
species(name = 'c6B',
|
||||
atoms = 'H:2 C:1',
|
||||
thermo = const_cp(h0 = (40.9, 'kcal/mol'),
|
||||
s0 = (26.9, 'cal/mol/K') ) )
|
||||
s0 = (26.9, 'cal/mol/K')))
|
||||
|
||||
surface_reaction('c6HH + H <=> c6H* + H2', [1.3e14, 0.0, 7.3]) # a
|
||||
surface_reaction('c6H* + H <=> c6HH', [1.0e13, 0.0, 0.0]) # b
|
||||
surface_reaction('c6H* + CH3 <=> c6HM', [5.0e12, 0.0, 0.0]) # c
|
||||
surface_reaction('c6HM + H <=> c6*M + H2', [1.3e14, 0.0, 7.3]) # d
|
||||
surface_reaction('c6*M + H <=> c6HM', [1.0e13, 0.0, 0.0]) # e
|
||||
surface_reaction('c6HM + H <=> c6HM* + H2', [2.8e7, 2.0, 7.7]) # f
|
||||
surface_reaction('c6HM* + H <=> c6HM', [1.0e13, 0.0, 0.0]) # g
|
||||
surface_reaction('c6HM* <=> c6*M', [1.0e8, 0.0, 0.0]) # h
|
||||
surface_reaction('c6HM* + H <=> c6H* + CH3', [3.0e13, 0.0, 0.0]) # i
|
||||
surface_reaction('c6HM* + H <=> c6B + H2', [1.3e14, 0.0, 7.3]) # k
|
||||
surface_reaction('c6*M + H <=> c6B + H2', [2.8e7, 2.0, 7.7]) # l
|
||||
surface_reaction('c6HH + H <=> c6*H + H2', [1.3e14, 0.0, 7.3]) # m
|
||||
surface_reaction('c6*H + H <=> c6HH', [1.0e13, 0.0, 0.0]) # n
|
||||
surface_reaction('c6H* + H <=> c6** + H2', [1.3e14, 0.0, 7.3]) # o
|
||||
surface_reaction('c6** + H <=> c6H*', [1.0e13, 0.0, 0.0]) # p
|
||||
surface_reaction('c6*H + H <=> c6** + H2', [4.5e6, 2.0, 5.0]) # q
|
||||
surface_reaction('c6** + H <=> c6*H', [1.0e13, 0.0, 0.0]) # r
|
||||
surface_reaction('c6** + CH3 <=> c6*M', [5.0e12, 0.0, 0.0]) # s
|
||||
surface_reaction('c6H* <=> c6*H', [1.0e8, 0.0, 0.0]) # t
|
||||
surface_reaction('c6B => c6HH + C(d)', [1.0e9, 0.0, 0.0])
|
||||
surface_reaction('c6HH + H <=> c6H* + H2', [1.3E14, 0.0, 7.3]) # a
|
||||
surface_reaction('c6H* + H <=> c6HH', [1.0E13, 0.0, 0.0]) # b
|
||||
surface_reaction('c6H* + CH3 <=> c6HM', [5.0E12, 0.0, 0.0]) # c
|
||||
surface_reaction('c6HM + H <=> c6*M + H2', [1.3E14, 0.0, 7.3]) # d
|
||||
surface_reaction('c6*M + H <=> c6HM', [1.0E13, 0.0, 0.0]) # e
|
||||
surface_reaction('c6HM + H <=> c6HM* + H2', [2.8E7, 2.0, 7.7]) # f
|
||||
surface_reaction('c6HM* + H <=> c6HM', [1.0E13, 0.0, 0.0]) # g
|
||||
surface_reaction('c6HM* <=> c6*M', [1.0E8, 0.0, 0.0]) # h
|
||||
surface_reaction('c6HM* + H <=> c6H* + CH3', [3.0E13, 0.0, 0.0]) # i
|
||||
surface_reaction('c6HM* + H <=> c6B + H2', [1.3E14, 0.0, 7.3]) # k
|
||||
surface_reaction('c6*M + H <=> c6B + H2', [2.8E7, 2.0, 7.7]) # l
|
||||
surface_reaction('c6HH + H <=> c6*H + H2', [1.3E14, 0.0, 7.3]) # m
|
||||
surface_reaction('c6*H + H <=> c6HH', [1.0E13, 0.0, 0.0]) # m
|
||||
surface_reaction('c6H* + H <=> c6** + H2', [1.3E14, 0.0, 7.3]) # o
|
||||
surface_reaction('c6** + H <=> c6H*', [1.0E13, 0.0, 0.0]) # p
|
||||
surface_reaction('c6*H + H <=> c6** + H2', [4.5E6, 2.0, 5.0]) # q
|
||||
surface_reaction('c6** + H <=> c6*H', [1.0E13, 0.0, 0.0]) # r
|
||||
surface_reaction('c6** + CH3 <=> c6*M', [5.0E12, 0.0, 0.0]) # s
|
||||
surface_reaction('c6H* <=> c6*H', [1.0E8, 0.0, 0.0]) # t
|
||||
|
||||
# reaction to add new carbon atom to bulk and regenerate a new site
|
||||
#
|
||||
surface_reaction('c6B => c6HH + C(d)', [1.0E9, 0.0, 0.0]) # u
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -117,7 +117,7 @@ species(name = "O2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
polar = 1.60,
|
||||
rot_relax = 3.80),
|
||||
|
|
@ -153,9 +153,9 @@ species(name = "H2O",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 2.60,
|
||||
diam = 2.605,
|
||||
well_depth = 572.40,
|
||||
dipole = 1.84,
|
||||
dipole = 1.844,
|
||||
rot_relax = 4.00),
|
||||
note = "L 8/89"
|
||||
)
|
||||
|
|
@ -172,7 +172,7 @@ species(name = "HO2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
rot_relax = 1.00),
|
||||
note = "L 5/89"
|
||||
|
|
@ -190,7 +190,7 @@ species(name = "H2O2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
rot_relax = 3.80),
|
||||
note = "L 7/88"
|
||||
|
|
@ -208,7 +208,7 @@ species(name = "C",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.30,
|
||||
diam = 3.298,
|
||||
well_depth = 71.40),
|
||||
note = "L11/88"
|
||||
)
|
||||
|
|
@ -293,7 +293,7 @@ species(name = "CH4",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.75,
|
||||
diam = 3.746,
|
||||
well_depth = 141.40,
|
||||
polar = 2.60,
|
||||
rot_relax = 13.00),
|
||||
|
|
@ -331,7 +331,7 @@ species(name = "CO2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.76,
|
||||
diam = 3.763,
|
||||
well_depth = 244.00,
|
||||
polar = 2.65,
|
||||
rot_relax = 2.10),
|
||||
|
|
@ -423,7 +423,7 @@ species(name = "CH3OH",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.63,
|
||||
diam = 3.626,
|
||||
well_depth = 481.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 8/88"
|
||||
|
|
@ -495,7 +495,7 @@ species(name = "C2H4",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.97,
|
||||
diam = 3.971,
|
||||
well_depth = 280.80,
|
||||
rot_relax = 1.50),
|
||||
note = "L 1/91"
|
||||
|
|
@ -513,7 +513,7 @@ species(name = "C2H5",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.30,
|
||||
diam = 4.302,
|
||||
well_depth = 252.30,
|
||||
rot_relax = 1.50),
|
||||
note = "L12/92"
|
||||
|
|
@ -531,7 +531,7 @@ species(name = "C2H6",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.30,
|
||||
diam = 4.302,
|
||||
well_depth = 252.30,
|
||||
rot_relax = 1.50),
|
||||
note = "L 8/88"
|
||||
|
|
@ -603,7 +603,7 @@ species(name = "N",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.30,
|
||||
diam = 3.298,
|
||||
well_depth = 71.40),
|
||||
note = "L 6/88"
|
||||
)
|
||||
|
|
@ -676,7 +676,7 @@ species(name = "NNH",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.80,
|
||||
diam = 3.798,
|
||||
well_depth = 71.40,
|
||||
rot_relax = 1.00),
|
||||
note = "T07/93"
|
||||
|
|
@ -694,7 +694,7 @@ species(name = "NO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
diam = 3.621,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
|
|
@ -731,7 +731,7 @@ species(name = "N2O",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "L 7/88"
|
||||
|
|
@ -749,7 +749,7 @@ species(name = "HNO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.49,
|
||||
diam = 3.492,
|
||||
well_depth = 116.70,
|
||||
rot_relax = 1.00),
|
||||
note = "And93"
|
||||
|
|
@ -767,7 +767,7 @@ species(name = "CN",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.86,
|
||||
diam = 3.856,
|
||||
well_depth = 75.00,
|
||||
rot_relax = 1.00),
|
||||
note = "HBH92"
|
||||
|
|
@ -839,7 +839,7 @@ species(name = "HCNO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -857,7 +857,7 @@ species(name = "HOCN",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -875,7 +875,7 @@ species(name = "HNCO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -893,7 +893,7 @@ species(name = "NCO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "EA 93"
|
||||
|
|
@ -911,7 +911,7 @@ species(name = "N2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
diam = 3.621,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
|
|
@ -947,7 +947,7 @@ species(name = "C3H7",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.98,
|
||||
diam = 4.982,
|
||||
well_depth = 266.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 9/84"
|
||||
|
|
@ -965,7 +965,7 @@ species(name = "C3H8",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.98,
|
||||
diam = 4.982,
|
||||
well_depth = 266.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 4/85"
|
||||
|
|
@ -2014,10 +2014,10 @@ reaction( "C2H3 + O2 <=> O + CH2CHO", [3.03000E+11, 0.29, 11])
|
|||
reaction( "C2H3 + O2 <=> HO2 + C2H2", [1.33700E+06, 1.61, -384])
|
||||
|
||||
# Reaction 296
|
||||
reaction( "O + CH3CHO <=> OH + CH2CHO", [5.84000E+12, 0, 1808])
|
||||
reaction( "O + CH3CHO <=> OH + CH2CHO", [2.920000E+12, 0, 1808])
|
||||
|
||||
# Reaction 297
|
||||
reaction( "O + CH3CHO => OH + CH3 + CO", [5.84000E+12, 0, 1808])
|
||||
reaction( "O + CH3CHO => OH + CH3 + CO", [2.920000E+12, 0, 1808])
|
||||
|
||||
# Reaction 298
|
||||
reaction( "O2 + CH3CHO => HO2 + CH3 + CO", [3.01000E+13, 0, 39150])
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
! GRI-Mech Version 3.0 3/12/99 CHEMKIN-II format
|
||||
! GRI-Mech Version 3.0 7/30/99 CHEMKIN-II format
|
||||
! See README30 file at anonymous FTP site unix.sri.com, directory gri;
|
||||
! WorldWideWeb home page http://www.me.berkeley.edu/gri_mech/ or
|
||||
! through http://www.gri.org , under 'Basic Research',
|
||||
|
|
@ -15,221 +15,9 @@ NH2 NH3 NNH NO NO2 N2O HNO CN
|
|||
HCN H2CN HCNN HCNO HOCN HNCO NCO N2
|
||||
AR C3H7 C3H8 CH2CHO CH3CHO
|
||||
END
|
||||
THERMO ALL
|
||||
300.000 1000.000 5000.000
|
||||
O L 1/90O 1 00 00 00G 200.000 3500.000 1000.000 1
|
||||
2.56942078E+00-8.59741137E-05 4.19484589E-08-1.00177799E-11 1.22833691E-15 2
|
||||
2.92175791E+04 4.78433864E+00 3.16826710E+00-3.27931884E-03 6.64306396E-06 3
|
||||
-6.12806624E-09 2.11265971E-12 2.91222592E+04 2.05193346E+00 4
|
||||
O2 TPIS89O 2 00 00 00G 200.000 3500.000 1000.000 1
|
||||
3.28253784E+00 1.48308754E-03-7.57966669E-07 2.09470555E-10-2.16717794E-14 2
|
||||
-1.08845772E+03 5.45323129E+00 3.78245636E+00-2.99673416E-03 9.84730201E-06 3
|
||||
-9.68129509E-09 3.24372837E-12-1.06394356E+03 3.65767573E+00 4
|
||||
H L 7/88H 1 00 00 00G 200.000 3500.000 1000.000 1
|
||||
2.50000001E+00-2.30842973E-11 1.61561948E-14-4.73515235E-18 4.98197357E-22 2
|
||||
2.54736599E+04-4.46682914E-01 2.50000000E+00 7.05332819E-13-1.99591964E-15 3
|
||||
2.30081632E-18-9.27732332E-22 2.54736599E+04-4.46682853E-01 4
|
||||
H2 TPIS78H 2 00 00 00G 200.000 3500.000 1000.000 1
|
||||
3.33727920E+00-4.94024731E-05 4.99456778E-07-1.79566394E-10 2.00255376E-14 2
|
||||
-9.50158922E+02-3.20502331E+00 2.34433112E+00 7.98052075E-03-1.94781510E-05 3
|
||||
2.01572094E-08-7.37611761E-12-9.17935173E+02 6.83010238E-01 4
|
||||
OH RUS 78O 1H 1 00 00G 200.000 3500.000 1000.000 1
|
||||
3.09288767E+00 5.48429716E-04 1.26505228E-07-8.79461556E-11 1.17412376E-14 2
|
||||
3.85865700E+03 4.47669610E+00 3.99201543E+00-2.40131752E-03 4.61793841E-06 3
|
||||
-3.88113333E-09 1.36411470E-12 3.61508056E+03-1.03925458E-01 4
|
||||
H2O L 8/89H 2O 1 00 00G 200.000 3500.000 1000.000 1
|
||||
3.03399249E+00 2.17691804E-03-1.64072518E-07-9.70419870E-11 1.68200992E-14 2
|
||||
-3.00042971E+04 4.96677010E+00 4.19864056E+00-2.03643410E-03 6.52040211E-06 3
|
||||
-5.48797062E-09 1.77197817E-12-3.02937267E+04-8.49032208E-01 4
|
||||
HO2 L 5/89H 1O 2 00 00G 200.000 3500.000 1000.000 1
|
||||
4.01721090E+00 2.23982013E-03-6.33658150E-07 1.14246370E-10-1.07908535E-14 2
|
||||
1.11856713E+02 3.78510215E+00 4.30179801E+00-4.74912051E-03 2.11582891E-05 3
|
||||
-2.42763894E-08 9.29225124E-12 2.94808040E+02 3.71666245E+00 4
|
||||
H2O2 L 7/88H 2O 2 00 00G 200.000 3500.000 1000.000 1
|
||||
4.16500285E+00 4.90831694E-03-1.90139225E-06 3.71185986E-10-2.87908305E-14 2
|
||||
-1.78617877E+04 2.91615662E+00 4.27611269E+00-5.42822417E-04 1.67335701E-05 3
|
||||
-2.15770813E-08 8.62454363E-12-1.77025821E+04 3.43505074E+00 4
|
||||
C L11/88C 1 00 00 00G 200.000 3500.000 1000.000 1
|
||||
2.49266888E+00 4.79889284E-05-7.24335020E-08 3.74291029E-11-4.87277893E-15 2
|
||||
8.54512953E+04 4.80150373E+00 2.55423955E+00-3.21537724E-04 7.33792245E-07 3
|
||||
-7.32234889E-10 2.66521446E-13 8.54438832E+04 4.53130848E+00 4
|
||||
CH TPIS79C 1H 1 00 00G 200.000 3500.000 1000.000 1
|
||||
2.87846473E+00 9.70913681E-04 1.44445655E-07-1.30687849E-10 1.76079383E-14 2
|
||||
7.10124364E+04 5.48497999E+00 3.48981665E+00 3.23835541E-04-1.68899065E-06 3
|
||||
3.16217327E-09-1.40609067E-12 7.07972934E+04 2.08401108E+00 4
|
||||
CH2 L S/93C 1H 2 00 00G 200.000 3500.000 1000.000 1
|
||||
2.87410113E+00 3.65639292E-03-1.40894597E-06 2.60179549E-10-1.87727567E-14 2
|
||||
4.62636040E+04 6.17119324E+00 3.76267867E+00 9.68872143E-04 2.79489841E-06 3
|
||||
-3.85091153E-09 1.68741719E-12 4.60040401E+04 1.56253185E+00 4
|
||||
CH2(S) L S/93C 1H 2 00 00G 200.000 3500.000 1000.000 1
|
||||
2.29203842E+00 4.65588637E-03-2.01191947E-06 4.17906000E-10-3.39716365E-14 2
|
||||
5.09259997E+04 8.62650169E+00 4.19860411E+00-2.36661419E-03 8.23296220E-06 3
|
||||
-6.68815981E-09 1.94314737E-12 5.04968163E+04-7.69118967E-01 4
|
||||
CH3 L11/89C 1H 3 00 00G 200.000 3500.000 1000.000 1
|
||||
2.28571772E+00 7.23990037E-03-2.98714348E-06 5.95684644E-10-4.67154394E-14 2
|
||||
1.67755843E+04 8.48007179E+00 3.67359040E+00 2.01095175E-03 5.73021856E-06 3
|
||||
-6.87117425E-09 2.54385734E-12 1.64449988E+04 1.60456433E+00 4
|
||||
CH4 L 8/88C 1H 4 00 00G 200.000 3500.000 1000.000 1
|
||||
7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2
|
||||
-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3
|
||||
-4.84743026E-08 1.66693956E-11-1.02466476E+04-4.64130376E+00 4
|
||||
CO TPIS79C 1O 1 00 00G 200.000 3500.000 1000.000 1
|
||||
2.71518561E+00 2.06252743E-03-9.98825771E-07 2.30053008E-10-2.03647716E-14 2
|
||||
-1.41518724E+04 7.81868772E+00 3.57953347E+00-6.10353680E-04 1.01681433E-06 3
|
||||
9.07005884E-10-9.04424499E-13-1.43440860E+04 3.50840928E+00 4
|
||||
CO2 L 7/88C 1O 2 00 00G 200.000 3500.000 1000.000 1
|
||||
3.85746029E+00 4.41437026E-03-2.21481404E-06 5.23490188E-10-4.72084164E-14 2
|
||||
-4.87591660E+04 2.27163806E+00 2.35677352E+00 8.98459677E-03-7.12356269E-06 3
|
||||
2.45919022E-09-1.43699548E-13-4.83719697E+04 9.90105222E+00 4
|
||||
HCO L12/89H 1C 1O 1 00G 200.000 3500.000 1000.000 1
|
||||
2.77217438E+00 4.95695526E-03-2.48445613E-06 5.89161778E-10-5.33508711E-14 2
|
||||
4.01191815E+03 9.79834492E+00 4.22118584E+00-3.24392532E-03 1.37799446E-05 3
|
||||
-1.33144093E-08 4.33768865E-12 3.83956496E+03 3.39437243E+00 4
|
||||
CH2O L 8/88H 2C 1O 1 00G 200.000 3500.000 1000.000 1
|
||||
1.76069008E+00 9.20000082E-03-4.42258813E-06 1.00641212E-09-8.83855640E-14 2
|
||||
-1.39958323E+04 1.36563230E+01 4.79372315E+00-9.90833369E-03 3.73220008E-05 3
|
||||
-3.79285261E-08 1.31772652E-11-1.43089567E+04 6.02812900E-01 4
|
||||
CH2OH GUNL93C 1H 3O 1 00G 200.000 3500.000 1000.000 1
|
||||
3.69266569E+00 8.64576797E-03-3.75101120E-06 7.87234636E-10-6.48554201E-14 2
|
||||
-3.24250627E+03 5.81043215E+00 3.86388918E+00 5.59672304E-03 5.93271791E-06 3
|
||||
-1.04532012E-08 4.36967278E-12-3.19391367E+03 5.47302243E+00 4
|
||||
CH3O 121686C 1H 3O 1 G 0300.00 3000.00 1000.000 1
|
||||
0.03770799E+02 0.07871497E-01-0.02656384E-04 0.03944431E-08-0.02112616E-12 2
|
||||
0.12783252E+03 0.02929575E+02 0.02106204E+02 0.07216595E-01 0.05338472E-04 3
|
||||
-0.07377636E-07 0.02075610E-10 0.09786011E+04 0.13152177E+02 4
|
||||
CH3OH L 8/88C 1H 4O 1 00G 200.000 3500.000 1000.000 1
|
||||
1.78970791E+00 1.40938292E-02-6.36500835E-06 1.38171085E-09-1.17060220E-13 2
|
||||
-2.53748747E+04 1.45023623E+01 5.71539582E+00-1.52309129E-02 6.52441155E-05 3
|
||||
-7.10806889E-08 2.61352698E-11-2.56427656E+04-1.50409823E+00 4
|
||||
C2H L 1/91C 2H 1 00 00G 200.000 3500.000 1000.000 1
|
||||
3.16780652E+00 4.75221902E-03-1.83787077E-06 3.04190252E-10-1.77232770E-14 2
|
||||
6.71210650E+04 6.63589475E+00 2.88965733E+00 1.34099611E-02-2.84769501E-05 3
|
||||
2.94791045E-08-1.09331511E-11 6.68393932E+04 6.22296438E+00 4
|
||||
C2H2 L 1/91C 2H 2 00 00G 200.000 3500.000 1000.000 1
|
||||
4.14756964E+00 5.96166664E-03-2.37294852E-06 4.67412171E-10-3.61235213E-14 2
|
||||
2.59359992E+04-1.23028121E+00 8.08681094E-01 2.33615629E-02-3.55171815E-05 3
|
||||
2.80152437E-08-8.50072974E-12 2.64289807E+04 1.39397051E+01 4
|
||||
C2H3 L 2/92C 2H 3 00 00G 200.000 3500.000 1000.000 1
|
||||
3.01672400E+00 1.03302292E-02-4.68082349E-06 1.01763288E-09-8.62607041E-14 2
|
||||
3.46128739E+04 7.78732378E+00 3.21246645E+00 1.51479162E-03 2.59209412E-05 3
|
||||
-3.57657847E-08 1.47150873E-11 3.48598468E+04 8.51054025E+00 4
|
||||
C2H4 L 1/91C 2H 4 00 00G 200.000 3500.000 1000.000 1
|
||||
2.03611116E+00 1.46454151E-02-6.71077915E-06 1.47222923E-09-1.25706061E-13 2
|
||||
4.93988614E+03 1.03053693E+01 3.95920148E+00-7.57052247E-03 5.70990292E-05 3
|
||||
-6.91588753E-08 2.69884373E-11 5.08977593E+03 4.09733096E+00 4
|
||||
C2H5 L12/92C 2H 5 00 00G 200.000 3500.000 1000.000 1
|
||||
1.95465642E+00 1.73972722E-02-7.98206668E-06 1.75217689E-09-1.49641576E-13 2
|
||||
1.28575200E+04 1.34624343E+01 4.30646568E+00-4.18658892E-03 4.97142807E-05 3
|
||||
-5.99126606E-08 2.30509004E-11 1.28416265E+04 4.70720924E+00 4
|
||||
C2H6 L 8/88C 2H 6 00 00G 200.000 3500.000 1000.000 1
|
||||
1.07188150E+00 2.16852677E-02-1.00256067E-05 2.21412001E-09-1.90002890E-13 2
|
||||
-1.14263932E+04 1.51156107E+01 4.29142492E+00-5.50154270E-03 5.99438288E-05 3
|
||||
-7.08466285E-08 2.68685771E-11-1.15222055E+04 2.66682316E+00 4
|
||||
CH2CO L 5/90C 2H 2O 1 00G 200.000 3500.000 1000.000 1
|
||||
4.51129732E+00 9.00359745E-03-4.16939635E-06 9.23345882E-10-7.94838201E-14 2
|
||||
-7.55105311E+03 6.32247205E-01 2.13583630E+00 1.81188721E-02-1.73947474E-05 3
|
||||
9.34397568E-09-2.01457615E-12-7.04291804E+03 1.22156480E+01 4
|
||||
HCCO SRIC91H 1C 2O 1 G 0300.00 4000.00 1000.000 1
|
||||
0.56282058E+01 0.40853401E-02-0.15934547E-05 0.28626052E-09-0.19407832E-13 2
|
||||
0.19327215E+05-0.39302595E+01 0.22517214E+01 0.17655021E-01-0.23729101E-04 3
|
||||
0.17275759E-07-0.50664811E-11 0.20059449E+05 0.12490417E+02 4
|
||||
HCCOH SRI91C 2O 1H 20 0G 300.000 5000.000 1000.000 1
|
||||
0.59238291E+01 0.67923600E-02-0.25658564E-05 0.44987841E-09-0.29940101E-13 2
|
||||
0.72646260E+04-0.76017742E+01 0.12423733E+01 0.31072201E-01-0.50866864E-04 3
|
||||
0.43137131E-07-0.14014594E-10 0.80316143E+04 0.13874319E+02 4
|
||||
H2CN 41687H 2C 1N 1 G 0300.00 4000.000 1000.000 1
|
||||
0.52097030E+01 0.29692911E-02-0.28555891E-06-0.16355500E-09 0.30432589E-13 2
|
||||
0.27677109E+05-0.44444780E+01 0.28516610E+01 0.56952331E-02 0.10711400E-05 3
|
||||
-0.16226120E-08-0.23511081E-12 0.28637820E+05 0.89927511E+01 4
|
||||
HCN GRI/98H 1C 1N 1 0G 200.000 6000.000 1000.000 1
|
||||
0.38022392E+01 0.31464228E-02-0.10632185E-05 0.16619757E-09-0.97997570E-14 2
|
||||
0.14407292E+05 0.15754601E+01 0.22589886E+01 0.10051170E-01-0.13351763E-04 3
|
||||
0.10092349E-07-0.30089028E-11 0.14712633E+05 0.89164419E+01 4
|
||||
HNO And93 H 1N 1O 1 0G 200.000 6000.000 1000.000 1
|
||||
0.29792509E+01 0.34944059E-02-0.78549778E-06 0.57479594E-10-0.19335916E-15 2
|
||||
0.11750582E+05 0.86063728E+01 0.45334916E+01-0.56696171E-02 0.18473207E-04 3
|
||||
-0.17137094E-07 0.55454573E-11 0.11548297E+05 0.17498417E+01 4
|
||||
N L 6/88N 1 0 0 0G 200.000 6000.000 1000.000 1
|
||||
0.24159429E+01 0.17489065E-03-0.11902369E-06 0.30226245E-10-0.20360982E-14 2
|
||||
0.56133773E+05 0.46496096E+01 0.25000000E+01 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00 0.56104637E+05 0.41939087E+01 4
|
||||
NNH T07/93N 2H 1 00 00G 200.000 6000.000 1000.000 1
|
||||
0.37667544E+01 0.28915082E-02-0.10416620E-05 0.16842594E-09-0.10091896E-13 2
|
||||
0.28650697E+05 0.44705067E+01 0.43446927E+01-0.48497072E-02 0.20059459E-04 3
|
||||
-0.21726464E-07 0.79469539E-11 0.28791973E+05 0.29779410E+01 4
|
||||
N2O L 7/88N 2O 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.48230729E+01 0.26270251E-02-0.95850874E-06 0.16000712E-09-0.97752303E-14 2
|
||||
0.80734048E+04-0.22017207E+01 0.22571502E+01 0.11304728E-01-0.13671319E-04 3
|
||||
0.96819806E-08-0.29307182E-11 0.87417744E+04 0.10757992E+02 4
|
||||
NH And94 N 1H 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.27836928E+01 0.13298430E-02-0.42478047E-06 0.78348501E-10-0.55044470E-14 2
|
||||
0.42120848E+05 0.57407799E+01 0.34929085E+01 0.31179198E-03-0.14890484E-05 3
|
||||
0.24816442E-08-0.10356967E-11 0.41880629E+05 0.18483278E+01 4
|
||||
NH2 And89 N 1H 2 0 0G 200.000 6000.000 1000.000 1
|
||||
0.28347421E+01 0.32073082E-02-0.93390804E-06 0.13702953E-09-0.79206144E-14 2
|
||||
0.22171957E+05 0.65204163E+01 0.42040029E+01-0.21061385E-02 0.71068348E-05 3
|
||||
-0.56115197E-08 0.16440717E-11 0.21885910E+05-0.14184248E+00 4
|
||||
NH3 J 6/77N 1H 3 0 0G 200.000 6000.000 1000.000 1
|
||||
0.26344521E+01 0.56662560E-02-0.17278676E-05 0.23867161E-09-0.12578786E-13 2
|
||||
-0.65446958E+04 0.65662928E+01 0.42860274E+01-0.46605230E-02 0.21718513E-04 3
|
||||
-0.22808887E-07 0.82638046E-11-0.67417285E+04-0.62537277E+00 4
|
||||
NO RUS 78N 1O 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.32606056E+01 0.11911043E-02-0.42917048E-06 0.69457669E-10-0.40336099E-14 2
|
||||
0.99209746E+04 0.63693027E+01 0.42184763E+01-0.46389760E-02 0.11041022E-04 3
|
||||
-0.93361354E-08 0.28035770E-11 0.98446230E+04 0.22808464E+01 4
|
||||
NO2 L 7/88N 1O 2 0 0G 200.000 6000.000 1000.000 1
|
||||
0.48847542E+01 0.21723956E-02-0.82806906E-06 0.15747510E-09-0.10510895E-13 2
|
||||
0.23164983E+04-0.11741695E+00 0.39440312E+01-0.15854290E-02 0.16657812E-04 3
|
||||
-0.20475426E-07 0.78350564E-11 0.28966179E+04 0.63119917E+01 4
|
||||
HCNO BDEA94H 1N 1C 1O 1G 300.000 5000.000 1382.000 1
|
||||
6.59860456E+00 3.02778626E-03-1.07704346E-06 1.71666528E-10-1.01439391E-14 2
|
||||
1.79661339E+04-1.03306599E+01 2.64727989E+00 1.27505342E-02-1.04794236E-05 3
|
||||
4.41432836E-09-7.57521466E-13 1.92990252E+04 1.07332972E+01 4
|
||||
HOCN BDEA94H 1N 1C 1O 1G 300.000 5000.000 1368.000 1
|
||||
5.89784885E+00 3.16789393E-03-1.11801064E-06 1.77243144E-10-1.04339177E-14 2
|
||||
-3.70653331E+03-6.18167825E+00 3.78604952E+00 6.88667922E-03-3.21487864E-06 3
|
||||
5.17195767E-10 1.19360788E-14-2.82698400E+03 5.63292162E+00 4
|
||||
HNCO BDEA94H 1N 1C 1O 1G 300.000 5000.000 1478.000 1
|
||||
6.22395134E+00 3.17864004E-03-1.09378755E-06 1.70735163E-10-9.95021955E-15 2
|
||||
-1.66599344E+04-8.38224741E+00 3.63096317E+00 7.30282357E-03-2.28050003E-06 3
|
||||
-6.61271298E-10 3.62235752E-13-1.55873636E+04 6.19457727E+00 4
|
||||
NCO EA 93 N 1C 1O 1 0G 200.000 6000.000 1000.000 1
|
||||
0.51521845E+01 0.23051761E-02-0.88033153E-06 0.14789098E-09-0.90977996E-14 2
|
||||
0.14004123E+05-0.25442660E+01 0.28269308E+01 0.88051688E-02-0.83866134E-05 3
|
||||
0.48016964E-08-0.13313595E-11 0.14682477E+05 0.95504646E+01 4
|
||||
CN HBH92 C 1N 1 0 0G 200.000 6000.000 1000.000 1
|
||||
0.37459805E+01 0.43450775E-04 0.29705984E-06-0.68651806E-10 0.44134173E-14 2
|
||||
0.51536188E+05 0.27867601E+01 0.36129351E+01-0.95551327E-03 0.21442977E-05 3
|
||||
-0.31516323E-09-0.46430356E-12 0.51708340E+05 0.39804995E+01 4
|
||||
HCNN SRI/94C 1N 2H 10 0G 300.000 5000.000 1000.000 1
|
||||
0.58946362E+01 0.39895959E-02-0.15982380E-05 0.29249395E-09-0.20094686E-13 2
|
||||
0.53452941E+05-0.51030502E+01 0.25243194E+01 0.15960619E-01-0.18816354E-04 3
|
||||
0.12125540E-07-0.32357378E-11 0.54261984E+05 0.11675870E+02 4
|
||||
N2 121286N 2 G 300.000 5000.000 1000.000 1
|
||||
0.02926640E+02 0.14879768E-02-0.05684760E-05 0.10097038E-09-0.06753351E-13 2
|
||||
-0.09227977E+04 0.05980528E+02 0.03298677E+02 0.14082404E-02-0.03963222E-04 3
|
||||
0.05641515E-07-0.02444854E-10-0.10208999E+04 0.03950372E+02 4
|
||||
AR 120186AR 1 G 300.000 5000.000 1000.000 1
|
||||
0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2
|
||||
-0.07453750E+04 0.04366000E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00-0.07453750E+04 0.04366000E+02 4
|
||||
C3H8 L 4/85C 3H 8 0 0G 300.000 5000.000 1000.00 1
|
||||
0.75341368E+01 0.18872239E-01-0.62718491E-05 0.91475649E-09-0.47838069E-13 2
|
||||
-0.16467516E+05-0.17892349E+02 0.93355381E+00 0.26424579E-01 0.61059727E-05 3
|
||||
-0.21977499E-07 0.95149253E-11-0.13958520E+05 0.19201691E+02 4
|
||||
C3H7 L 9/84C 3H 7 0 0G 300.000 5000.000 1000.00 1
|
||||
0.77026987E+01 0.16044203E-01-0.52833220E-05 0.76298590E-09-0.39392284E-13 2
|
||||
0.82984336E+04-0.15480180E+02 0.10515518E+01 0.25991980E-01 0.23800540E-05 3
|
||||
-0.19609569E-07 0.93732470E-11 0.10631863E+05 0.21122559E+02 4
|
||||
CH3CHO L 8/88C 2H 4O 1 0G 200.000 6000.000 1000.00 1
|
||||
0.54041108E+01 0.11723059E-01-0.42263137E-05 0.68372451E-09-0.40984863E-13 2
|
||||
-0.22593122E+05-0.34807917E+01 0.47294595E+01-0.31932858E-02 0.47534921E-04 3
|
||||
-0.57458611E-07 0.21931112E-10-0.21572878E+05 0.41030159E+01 4
|
||||
CH2CHO SAND86O 1H 3C 2 G 300.00 5000.00 1000.00 1
|
||||
0.05975670E+02 0.08130591E-01-0.02743624E-04 0.04070304E-08-0.02176017E-12 2
|
||||
0.04903218E+04-0.05045251E+02 0.03409062E+02 0.10738574E-01 0.01891492E-04 3
|
||||
-0.07158583E-07 0.02867385E-10 0.15214766E+04 0.09558290E+02 4
|
||||
END
|
||||
!THERMO
|
||||
! Insert GRI-Mech thermodynamics here or use in default file
|
||||
!END
|
||||
REACTIONS
|
||||
2O+M<=>O2+M 1.200E+17 -1.000 .00
|
||||
H2/ 2.40/ H2O/15.40/ CH4/ 2.00/ CO/ 1.75/ CO2/ 3.60/ C2H6/ 3.00/ AR/ .83/
|
||||
|
|
@ -616,8 +404,8 @@ CH2+CH2=>2H+C2H2 2.000E+14 .000 10989.00
|
|||
CH2(S)+H2O=>H2+CH2O 6.820E+10 .250 -935.00
|
||||
C2H3+O2<=>O+CH2CHO 3.030E+11 .290 11.00
|
||||
C2H3+O2<=>HO2+C2H2 1.337E+06 1.610 -384.00
|
||||
O+CH3CHO<=>OH+CH2CHO 5.840E+12 .000 1808.00
|
||||
O+CH3CHO=>OH+CH3+CO 5.840E+12 .000 1808.00
|
||||
O+CH3CHO<=>OH+CH2CHO 2.920E+12 .000 1808.00
|
||||
O+CH3CHO=>OH+CH3+CO 2.920E+12 .000 1808.00
|
||||
O2+CH3CHO=>HO2+CH3+CO 3.010E+13 .000 39150.00
|
||||
H+CH3CHO<=>CH2CHO+H2 2.050E+09 1.160 2405.00
|
||||
H+CH3CHO=>CH3+H2+CO 2.050E+09 1.160 2405.00
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -117,7 +117,7 @@ species(name = "O2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
polar = 1.60,
|
||||
rot_relax = 3.80),
|
||||
|
|
@ -153,9 +153,9 @@ species(name = "H2O",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 2.60,
|
||||
diam = 2.605,
|
||||
well_depth = 572.40,
|
||||
dipole = 1.84,
|
||||
dipole = 1.844,
|
||||
rot_relax = 4.00),
|
||||
note = "L 8/89"
|
||||
)
|
||||
|
|
@ -172,7 +172,7 @@ species(name = "HO2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
rot_relax = 1.00),
|
||||
note = "L 5/89"
|
||||
|
|
@ -190,7 +190,7 @@ species(name = "H2O2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.46,
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
rot_relax = 3.80),
|
||||
note = "L 7/88"
|
||||
|
|
@ -208,7 +208,7 @@ species(name = "C",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.30,
|
||||
diam = 3.298,
|
||||
well_depth = 71.40),
|
||||
note = "L11/88"
|
||||
)
|
||||
|
|
@ -293,7 +293,7 @@ species(name = "CH4",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.75,
|
||||
diam = 3.746,
|
||||
well_depth = 141.40,
|
||||
polar = 2.60,
|
||||
rot_relax = 13.00),
|
||||
|
|
@ -331,7 +331,7 @@ species(name = "CO2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.76,
|
||||
diam = 3.763,
|
||||
well_depth = 244.00,
|
||||
polar = 2.65,
|
||||
rot_relax = 2.10),
|
||||
|
|
@ -423,7 +423,7 @@ species(name = "CH3OH",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.63,
|
||||
diam = 3.626,
|
||||
well_depth = 481.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 8/88"
|
||||
|
|
@ -495,7 +495,7 @@ species(name = "C2H4",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.97,
|
||||
diam = 3.971,
|
||||
well_depth = 280.80,
|
||||
rot_relax = 1.50),
|
||||
note = "L 1/91"
|
||||
|
|
@ -513,7 +513,7 @@ species(name = "C2H5",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.30,
|
||||
diam = 4.302,
|
||||
well_depth = 252.30,
|
||||
rot_relax = 1.50),
|
||||
note = "L12/92"
|
||||
|
|
@ -531,7 +531,7 @@ species(name = "C2H6",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.30,
|
||||
diam = 4.302,
|
||||
well_depth = 252.30,
|
||||
rot_relax = 1.50),
|
||||
note = "L 8/88"
|
||||
|
|
@ -603,7 +603,7 @@ species(name = "N",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.30,
|
||||
diam = 3.298,
|
||||
well_depth = 71.40),
|
||||
note = "L 6/88"
|
||||
)
|
||||
|
|
@ -676,7 +676,7 @@ species(name = "NNH",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.80,
|
||||
diam = 3.798,
|
||||
well_depth = 71.40,
|
||||
rot_relax = 1.00),
|
||||
note = "T07/93"
|
||||
|
|
@ -694,7 +694,7 @@ species(name = "NO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
diam = 3.621,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
|
|
@ -731,7 +731,7 @@ species(name = "N2O",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "L 7/88"
|
||||
|
|
@ -749,7 +749,7 @@ species(name = "HNO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.49,
|
||||
diam = 3.492,
|
||||
well_depth = 116.70,
|
||||
rot_relax = 1.00),
|
||||
note = "And93"
|
||||
|
|
@ -767,7 +767,7 @@ species(name = "CN",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.86,
|
||||
diam = 3.856,
|
||||
well_depth = 75.00,
|
||||
rot_relax = 1.00),
|
||||
note = "HBH92"
|
||||
|
|
@ -839,7 +839,7 @@ species(name = "HCNO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -857,7 +857,7 @@ species(name = "HOCN",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -875,7 +875,7 @@ species(name = "HNCO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "BDEA94"
|
||||
|
|
@ -893,7 +893,7 @@ species(name = "NCO",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.83,
|
||||
diam = 3.828,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "EA 93"
|
||||
|
|
@ -911,7 +911,7 @@ species(name = "N2",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
diam = 3.621,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
|
|
@ -947,7 +947,7 @@ species(name = "C3H7",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.98,
|
||||
diam = 4.982,
|
||||
well_depth = 266.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 9/84"
|
||||
|
|
@ -965,7 +965,7 @@ species(name = "C3H8",
|
|||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 4.98,
|
||||
diam = 4.982,
|
||||
well_depth = 266.80,
|
||||
rot_relax = 1.00),
|
||||
note = "L 4/85"
|
||||
|
|
@ -2014,10 +2014,10 @@ reaction( "C2H3 + O2 <=> O + CH2CHO", [3.03000E+11, 0.29, 11])
|
|||
reaction( "C2H3 + O2 <=> HO2 + C2H2", [1.33700E+06, 1.61, -384])
|
||||
|
||||
# Reaction 296
|
||||
reaction( "O + CH3CHO <=> OH + CH2CHO", [5.84000E+12, 0, 1808])
|
||||
reaction( "O + CH3CHO <=> OH + CH2CHO", [2.920000E+12, 0, 1808])
|
||||
|
||||
# Reaction 297
|
||||
reaction( "O + CH3CHO => OH + CH3 + CO", [5.84000E+12, 0, 1808])
|
||||
reaction( "O + CH3CHO => OH + CH3 + CO", [2.920000E+12, 0, 1808])
|
||||
|
||||
# Reaction 298
|
||||
reaction( "O2 + CH3CHO => HO2 + CH3 + CO", [3.01000E+13, 0, 39150])
|
||||
|
|
|
|||
231
data/inputs/gri30_ion.cti
Normal file
231
data/inputs/gri30_ion.cti
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
units(length='cm', time='s', quantity='mol', act_energy='cal/mol')
|
||||
|
||||
ideal_gas(name='gas',
|
||||
elements=' O H C N Ar E',
|
||||
species=['H2 O2 H2O CH4 CO CO2 N2',
|
||||
'''gri30: H O OH HO2 H2O2 C CH
|
||||
CH2 CH2(S) CH3 HCO CH2O CH2OH CH3O
|
||||
CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH
|
||||
N NH NH2 NH3 NNH NO NO2 N2O HNO CN
|
||||
HCN H2CN HCNN HCNO HOCN HNCO NCO AR C3H7
|
||||
C3H8 CH2CHO CH3CHO''',
|
||||
'HCO+ H3O+ E'],
|
||||
reactions=['gri30: all', 'all'],
|
||||
transport='Ion',
|
||||
options=['skip_undeclared_species', 'skip_undeclared_third_bodies'],
|
||||
initial_state=state(temperature=300.0, pressure=OneAtm))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Species data
|
||||
#-------------------------------------------------------------------------------
|
||||
# The values of polarizability of H2, O2, H2O, CH4, CO, CO2, and N2 are from
|
||||
# the supplementary material of Han, Jie, et al. "Numerical modelling of ion
|
||||
# transport in flames." Combustion Theory and Modelling 19.6 (2015): 744-772.
|
||||
# DOI: 10.1080/13647830.2015.1090018
|
||||
|
||||
species(name = "H2",
|
||||
atoms = " H:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 2.344331120E+00, 7.980520750E-03,
|
||||
-1.947815100E-05, 2.015720940E-08, -7.376117610E-12,
|
||||
-9.179351730E+02, 6.830102380E-01] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.337279200E+00, -4.940247310E-05,
|
||||
4.994567780E-07, -1.795663940E-10, 2.002553760E-14,
|
||||
-9.501589220E+02, -3.205023310E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 2.92,
|
||||
well_depth = 38.00,
|
||||
polar = 0.455,
|
||||
rot_relax = 280.00),
|
||||
note = '''The value of polarizability is from the supplementary
|
||||
material of Han, Jie, et al. "Numerical modelling of ion
|
||||
transport in flames." Combustion Theory and Modelling
|
||||
19.6 (2015): 744-772. DOI: 10.1080/13647830.2015.1090018'''
|
||||
)
|
||||
|
||||
species(name = "O2",
|
||||
atoms = " O:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.782456360E+00, -2.996734160E-03,
|
||||
9.847302010E-06, -9.681295090E-09, 3.243728370E-12,
|
||||
-1.063943560E+03, 3.657675730E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.282537840E+00, 1.483087540E-03,
|
||||
-7.579666690E-07, 2.094705550E-10, -2.167177940E-14,
|
||||
-1.088457720E+03, 5.453231290E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.458,
|
||||
well_depth = 107.40,
|
||||
polar = 1.131,
|
||||
rot_relax = 3.80),
|
||||
note = "TPIS89"
|
||||
)
|
||||
|
||||
species(name = "H2O",
|
||||
atoms = " H:2 O:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 4.198640560E+00, -2.036434100E-03,
|
||||
6.520402110E-06, -5.487970620E-09, 1.771978170E-12,
|
||||
-3.029372670E+04, -8.490322080E-01] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.033992490E+00, 2.176918040E-03,
|
||||
-1.640725180E-07, -9.704198700E-11, 1.682009920E-14,
|
||||
-3.000429710E+04, 4.966770100E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 2.605,
|
||||
well_depth = 572.40,
|
||||
dipole = 1.844,
|
||||
polar = 1.053,
|
||||
rot_relax = 4.00),
|
||||
note = "L 8/89"
|
||||
)
|
||||
|
||||
species(name = "CH4",
|
||||
atoms = " C:1 H:4 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 5.149876130E+00, -1.367097880E-02,
|
||||
4.918005990E-05, -4.847430260E-08, 1.666939560E-11,
|
||||
-1.024664760E+04, -4.641303760E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 7.485149500E-02, 1.339094670E-02,
|
||||
-5.732858090E-06, 1.222925350E-09, -1.018152300E-13,
|
||||
-9.468344590E+03, 1.843731800E+01] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.746,
|
||||
well_depth = 141.40,
|
||||
polar = 2.60,
|
||||
rot_relax = 13.00),
|
||||
note = "L 8/88"
|
||||
)
|
||||
|
||||
species(name = "CO",
|
||||
atoms = " C:1 O:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.579533470E+00, -6.103536800E-04,
|
||||
1.016814330E-06, 9.070058840E-10, -9.044244990E-13,
|
||||
-1.434408600E+04, 3.508409280E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 2.715185610E+00, 2.062527430E-03,
|
||||
-9.988257710E-07, 2.300530080E-10, -2.036477160E-14,
|
||||
-1.415187240E+04, 7.818687720E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.65,
|
||||
well_depth = 98.10,
|
||||
polar = 1.95,
|
||||
rot_relax = 1.80),
|
||||
note = "TPIS79"
|
||||
)
|
||||
|
||||
species(name = "CO2",
|
||||
atoms = " C:1 O:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 2.356773520E+00, 8.984596770E-03,
|
||||
-7.123562690E-06, 2.459190220E-09, -1.436995480E-13,
|
||||
-4.837196970E+04, 9.901052220E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.857460290E+00, 4.414370260E-03,
|
||||
-2.214814040E-06, 5.234901880E-10, -4.720841640E-14,
|
||||
-4.875916600E+04, 2.271638060E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.763,
|
||||
well_depth = 244.00,
|
||||
polar = 2.65,
|
||||
rot_relax = 2.10),
|
||||
note = "L 7/88"
|
||||
)
|
||||
|
||||
species(name = "N2",
|
||||
atoms = " N:2 ",
|
||||
thermo = (
|
||||
NASA( [ 300.00, 1000.00], [ 3.298677000E+00, 1.408240400E-03,
|
||||
-3.963222000E-06, 5.641515000E-09, -2.444854000E-12,
|
||||
-1.020899900E+03, 3.950372000E+00] ),
|
||||
NASA( [ 1000.00, 5000.00], [ 2.926640000E+00, 1.487976800E-03,
|
||||
-5.684760000E-07, 1.009703800E-10, -6.753351000E-15,
|
||||
-9.227977000E+02, 5.980528000E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.621,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
note = "121286"
|
||||
)
|
||||
|
||||
species(name = 'HCO+',
|
||||
atoms = ' H:1 C:1 O:1 E:-1 ',
|
||||
thermo = (
|
||||
NASA( [ 300.00, 1000.00], [ 2.473973600E+00, 8.671559000E-03,
|
||||
-1.003150000E-05, 6.717052700E-09, -1.787267400E-12,
|
||||
9.914660800E+04, 8.175711870E+00] ),
|
||||
NASA( [ 1000.00, 5000.00], [ 3.741188000E+00, 3.344151700E-03,
|
||||
-1.239712100E-06, 2.118938800E-10, -1.370415000E-14,
|
||||
9.888407800E+04, 2.078613570E+00] )
|
||||
),
|
||||
transport=gas_transport(geom='linear',
|
||||
diam=3.59,
|
||||
well_depth=498.0,
|
||||
polar=1.356),
|
||||
note = '''The polarizability is from Han, Jie, et al.
|
||||
"Numerical modelling of ion transport in flames."
|
||||
,and the rest of the parameters are from its neutral
|
||||
counterpart HCO''')
|
||||
|
||||
species(name = 'H3O+',
|
||||
atoms = ' H:3 O:1 E:-1 ',
|
||||
thermo = (
|
||||
NASA( [ 298.15, 1000.00], [ 3.792952700E+00, -9.108540000E-04,
|
||||
1.163635490E-05, -1.213648870E-08, 4.261596630E-12,
|
||||
7.075124010E+04, 1.471568560E+00] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 2.496477160E+00, 5.728449200E-03,
|
||||
-1.839532810E-06, 2.735774390E-10, -1.540939850E-14,
|
||||
7.097291130E+04, 7.458507790E+00] )
|
||||
),
|
||||
transport=gas_transport(geom='nonlinear',
|
||||
diam=3.15,
|
||||
well_depth=106.2,
|
||||
dipole=1.417,
|
||||
polar=0.897),
|
||||
note = '''The transport parameters are from Han, Jie, et al.
|
||||
"Numerical modelling of ion transport in flames."''')
|
||||
|
||||
species(name = 'E',
|
||||
atoms = ' E:1 ',
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
-7.453750000E+02, -1.172469020E+01] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
-7.453750000E+02, -1.172469020E+01] )
|
||||
),
|
||||
transport=gas_transport(geom='atom',
|
||||
diam=2.05,
|
||||
well_depth=145.0,
|
||||
polar=0.667),
|
||||
note = 'The transport parameters are not used in IonGasTransport')
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Reaction data
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
reaction('CH + O => HCO+ + E', [2.51E+11, 0.0, 1700])
|
||||
|
||||
reaction('HCO+ + H2O => H3O+ + CO', [1.51E+15, 0.0, 0.0])
|
||||
|
||||
reaction('H3O+ + E => H2O + H', [2.29E+18, -0.5, 0.0])
|
||||
|
||||
reaction('H3O+ + E => OH + H + H', [7.95E+21, -1.4, 0.0])
|
||||
|
||||
reaction('H3O+ + E => H2 + OH', [1.25E+19, -0.5, 0.0])
|
||||
|
||||
reaction('H3O+ + E => O + H2 + H', [6.0E+17, -0.3, 0.0])
|
||||
|
||||
295
data/inputs/lithium_ion_battery.cti
Normal file
295
data/inputs/lithium_ion_battery.cti
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
#==============================================================================
|
||||
# Cantera input file for an LCO/graphite lithium-ion battery
|
||||
#
|
||||
# This file includes a full set of thermodynamic and kinetic parameters of a
|
||||
# lithium-ion battery, in particular:
|
||||
# - Active materials: LiCoO2 (LCO) and LiC6 (graphite)
|
||||
# - Organic electrolyte: EC/PC with 1M LiPF6
|
||||
# - Interfaces: LCO/electrolyte and LiC6/electrolyte
|
||||
# - Charge-transfer reactions at the two interfaces
|
||||
#
|
||||
# A MATLAB example using this file for simulating a discharge curve is
|
||||
# samples/matlab/lithium_ion_battery.m
|
||||
#
|
||||
# Reference:
|
||||
# M. Mayur, S. C. DeCaluwe, B. L. Kee, W. G. Bessler, “Modeling and simulation
|
||||
# of the thermodynamics of lithium-ion battery intercalation materials in the
|
||||
# open-source software Cantera,” Electrochim. Acta 323, 134797 (2019),
|
||||
# https://doi.org/10.1016/j.electacta.2019.134797
|
||||
|
||||
#==============================================================================
|
||||
|
||||
#==============================================================================
|
||||
# Bulk phases
|
||||
#==============================================================================
|
||||
#------------------------------------------------------------------------------
|
||||
# Graphite (anode)
|
||||
# Thermodynamic data based on half-cell measurements by K. Kumaresan et al.,
|
||||
# J. Electrochem. Soc. 155, A164-A171 (2008)
|
||||
#------------------------------------------------------------------------------
|
||||
BinarySolutionTabulatedThermo(
|
||||
name = "anode",
|
||||
elements = "Li C",
|
||||
species = "Li[anode] V[anode]",
|
||||
standard_concentration = "unity",
|
||||
tabulated_species = "Li[anode]",
|
||||
tabulated_thermo = table(
|
||||
moleFraction = ([5.75000E-03, 1.77591E-02, 2.97682E-02, 4.17773E-02, 5.37864E-02, 6.57954E-02, 7.78045E-02, 8.98136E-02, 1.01823E-01, 1.13832E-01,
|
||||
1.25841E-01, 1.37850E-01, 1.49859E-01, 1.61868E-01, 1.73877E-01, 1.85886E-01, 1.97896E-01, 2.09904E-01, 2.21914E-01, 2.33923E-01,
|
||||
2.45932E-01, 2.57941E-01, 2.69950E-01, 2.81959E-01, 2.93968E-01, 3.05977E-01, 3.17986E-01, 3.29995E-01, 3.42004E-01, 3.54014E-01,
|
||||
3.66023E-01, 3.78032E-01, 3.90041E-01, 4.02050E-01, 4.14059E-01, 4.26068E-01, 4.38077E-01, 4.50086E-01, 4.62095E-01, 4.74104E-01,
|
||||
4.86114E-01, 4.98123E-01, 5.10132E-01, 5.22141E-01, 5.34150E-01, 5.46159E-01, 5.58168E-01, 5.70177E-01, 5.82186E-01, 5.94195E-01,
|
||||
6.06205E-01, 6.18214E-01, 6.30223E-01, 6.42232E-01, 6.54241E-01, 6.66250E-01, 6.78259E-01, 6.90268E-01, 7.02277E-01, 7.14286E-01,
|
||||
7.26295E-01, 7.38305E-01, 7.50314E-01, 7.62323E-01, 7.74332E-01, 7.86341E-01, 7.98350E-01],
|
||||
"1"),
|
||||
enthalpy = ([-6.40692E+04, -3.78794E+04, -1.99748E+04, -1.10478E+04, -7.04973E+03, -7.13749E+03, -8.79728E+03, -9.93655E+03, -1.03060E+04, -1.00679E+04,
|
||||
-9.69664E+03, -9.31556E+03, -8.90503E+03, -8.57057E+03, -8.38117E+03, -8.31928E+03, -8.31453E+03, -8.32977E+03, -8.33292E+03, -8.32931E+03,
|
||||
-8.31339E+03, -8.21331E+03, -8.08920E+03, -8.00131E+03, -7.92294E+03, -7.81543E+03, -7.77498E+03, -7.79440E+03, -7.78804E+03, -7.73218E+03,
|
||||
-7.69063E+03, -7.69630E+03, -7.63241E+03, -7.41910E+03, -7.06828E+03, -6.64544E+03, -6.17193E+03, -5.67055E+03, -5.14299E+03, -4.55704E+03,
|
||||
-3.94568E+03, -3.35408E+03, -2.87825E+03, -2.57690E+03, -2.43468E+03, -2.33952E+03, -2.23218E+03, -2.11482E+03, -2.03976E+03, -2.01990E+03,
|
||||
-2.01329E+03, -1.97991E+03, -1.92686E+03, -1.86602E+03, -1.81419E+03, -1.77693E+03, -1.74908E+03, -1.71494E+03, -1.67287E+03, -1.63685E+03,
|
||||
-1.59649E+03, -1.52295E+03, -1.39033E+03, -1.11524E+03, -5.34643E+02, 3.73854E+02, 1.60442E+03],
|
||||
"J/mol"),
|
||||
entropy = ([3.05724E+01, 4.04307E+01, 4.75718E+01, 5.25690E+01, 5.10953E+01, 4.43414E+01, 3.71575E+01, 3.23216E+01, 2.91586E+01, 2.70081E+01,
|
||||
2.53501E+01, 2.40845E+01, 2.30042E+01, 2.19373E+01, 2.07212E+01, 1.93057E+01, 1.77319E+01, 1.61153E+01, 1.46399E+01, 1.34767E+01,
|
||||
1.27000E+01, 1.23377E+01, 1.22815E+01, 1.23700E+01, 1.24863E+01, 1.26368E+01, 1.26925E+01, 1.26250E+01, 1.24861E+01, 1.23294E+01,
|
||||
1.21865E+01, 1.20723E+01, 1.21228E+01, 1.24383E+01, 1.30288E+01, 1.37342E+01, 1.44460E+01, 1.50813E+01, 1.56180E+01, 1.62213E+01,
|
||||
1.70474E+01, 1.80584E+01, 1.88377E+01, 1.92094E+01, 1.92957E+01, 1.93172E+01, 1.93033E+01, 1.92971E+01, 1.92977E+01, 1.92978E+01,
|
||||
1.92980E+01, 1.92978E+01, 1.92945E+01, 1.92899E+01, 1.92877E+01, 1.92882E+01, 1.92882E+01, 1.92882E+01, 1.92882E+01, 1.92882E+01,
|
||||
1.92885E+01, 1.92876E+01, 1.92837E+01, 1.92769E+01, 1.92850E+01, 1.93100E+01, 1.93514E+01],
|
||||
"J/mol/K")))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Lithium cobalt oxide (cathode)
|
||||
# Thermodynamic data based on half-cell measurements by K. Kumaresan et al.,
|
||||
# J. Electrochem. Soc. 155, A164-A171 (2008)
|
||||
#------------------------------------------------------------------------------
|
||||
BinarySolutionTabulatedThermo(
|
||||
name = "cathode",
|
||||
elements = "Li Co O",
|
||||
species = "Li[cathode] V[cathode]",
|
||||
standard_concentration = "unity",
|
||||
tabulated_species = "Li[cathode]",
|
||||
tabulated_thermo = table(
|
||||
moleFraction = ([4.59630E-01, 4.67368E-01, 4.75105E-01, 4.82843E-01, 4.90581E-01, 4.98318E-01, 5.06056E-01, 5.13794E-01, 5.21531E-01, 5.29269E-01,
|
||||
5.37007E-01, 5.44744E-01, 5.52482E-01, 5.60219E-01, 5.67957E-01, 5.75695E-01, 5.83432E-01, 5.91170E-01, 5.98908E-01, 6.06645E-01,
|
||||
6.14383E-01, 6.22121E-01, 6.29858E-01, 6.37596E-01, 6.45334E-01, 6.53071E-01, 6.60809E-01, 6.68547E-01, 6.76284E-01, 6.84022E-01,
|
||||
6.91759E-01, 6.99497E-01, 7.07235E-01, 7.14972E-01, 7.22710E-01, 7.30448E-01, 7.38185E-01, 7.45923E-01, 7.53661E-01, 7.61398E-01,
|
||||
7.69136E-01, 7.76873E-01, 7.84611E-01, 7.92349E-01, 8.00087E-01, 8.07824E-01, 8.15562E-01, 8.23299E-01, 8.31037E-01, 8.38775E-01,
|
||||
8.46512E-01, 8.54250E-01, 8.61988E-01, 8.69725E-01, 8.77463E-01, 8.85201E-01, 8.92938E-01, 9.00676E-01, 9.08413E-01, 9.16151E-01,
|
||||
9.23889E-01, 9.31627E-01, 9.39364E-01, 9.47102E-01, 9.54839E-01, 9.62577E-01, 9.70315E-01, 9.78052E-01, 9.85790E-01],
|
||||
"1"),
|
||||
enthalpy = ([-4.16188E+05, -4.14839E+05, -4.12629E+05, -4.09620E+05, -4.05334E+05, -3.99420E+05, -3.92499E+05, -3.85940E+05, -3.81474E+05, -3.80290E+05,
|
||||
-3.81445E+05, -3.83295E+05, -3.85062E+05, -3.86633E+05, -3.87928E+05, -3.88837E+05, -3.89240E+05, -3.89238E+05, -3.89157E+05, -3.89174E+05,
|
||||
-3.89168E+05, -3.88988E+05, -3.88675E+05, -3.88478E+05, -3.88443E+05, -3.88346E+05, -3.88083E+05, -3.87768E+05, -3.87531E+05, -3.87356E+05,
|
||||
-3.87205E+05, -3.87052E+05, -3.86960E+05, -3.86957E+05, -3.86918E+05, -3.86814E+05, -3.86785E+05, -3.86957E+05, -3.87146E+05, -3.87188E+05,
|
||||
-3.87239E+05, -3.87507E+05, -3.87902E+05, -3.88142E+05, -3.88316E+05, -3.88464E+05, -3.88563E+05, -3.88687E+05, -3.89000E+05, -3.89414E+05,
|
||||
-3.89735E+05, -3.90005E+05, -3.90317E+05, -3.90632E+05, -3.90865E+05, -3.91100E+05, -3.91453E+05, -3.91742E+05, -3.91833E+05, -3.91858E+05,
|
||||
-3.91910E+05, -3.91798E+05, -3.91470E+05, -3.91005E+05, -3.90261E+05, -3.89181E+05, -3.85506E+05, -3.73450E+05, -3.53926E+05],
|
||||
"J/mol"),
|
||||
entropy = ([-2.52348E+01, -2.54629E+01, -2.26068E+01, -1.68899E+01, -6.74549E+00, 9.76522E+00, 3.08711E+01, 4.98756E+01, 5.85766E+01, 5.46784E+01,
|
||||
4.40727E+01, 3.30834E+01, 2.37109E+01, 1.61658E+01, 1.02408E+01, 5.75684E+00, 2.19969E+00, -6.93265E-01, -3.40166E+00, -6.03548E+00,
|
||||
-8.45666E+00, -1.03459E+01, -1.18860E+01, -1.35610E+01, -1.53331E+01, -1.68255E+01, -1.81219E+01, -1.95052E+01, -2.07093E+01, -2.16274E+01,
|
||||
-2.25743E+01, -2.38272E+01, -2.52029E+01, -2.65835E+01, -2.77164E+01, -2.86064E+01, -2.96044E+01, -3.09551E+01, -3.21990E+01, -3.31284E+01,
|
||||
-3.40633E+01, -3.53177E+01, -3.66599E+01, -3.76439E+01, -3.85616E+01, -3.96433E+01, -4.06506E+01, -4.15566E+01, -4.27485E+01, -4.41419E+01,
|
||||
-4.52082E+01, -4.61154E+01, -4.71614E+01, -4.82305E+01, -4.89739E+01, -4.96529E+01, -5.06905E+01, -5.18080E+01, -5.26580E+01, -5.32766E+01,
|
||||
-5.39817E+01, -5.45468E+01, -5.48125E+01, -5.51520E+01, -5.54526E+01, -5.52961E+01, -5.50219E+01, -5.46653E+01, -5.42305E+01],
|
||||
"J/mol/K")))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Carbonate based electrolyte
|
||||
# Solvent: Ethylene carbonate:Propylene carbonate (1:1 v/v)
|
||||
# Salt: 1M LiPF6
|
||||
#------------------------------------------------------------------------------
|
||||
IdealSolidSolution(
|
||||
name = "electrolyte",
|
||||
elements = "Li P F C H O E",
|
||||
species = "C3H4O3[elyt] C4H6O3[elyt] Li+[elyt] PF6-[elyt]",
|
||||
initial_state = state(mole_fractions = 'C3H4O3[elyt]:0.47901 C4H6O3[elyt]:0.37563 Li+[elyt]:0.07268 PF6-[elyt]:0.07268'),
|
||||
standard_concentration = "unity")
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Electron conductor
|
||||
#------------------------------------------------------------------------------
|
||||
metal(
|
||||
name = "electron",
|
||||
elements = "E",
|
||||
species = "electron",
|
||||
density = (1.0, 'kg/m3'), # dummy entry
|
||||
initial_state = state( mole_fractions = "electron:1.0"))
|
||||
|
||||
|
||||
#==============================================================================
|
||||
# Species
|
||||
#==============================================================================
|
||||
#------------------------------------------------------------------------------
|
||||
# Lithium intercalated in graphite, MW: 79.0070 g/mol.
|
||||
# Note this species includes the carbon host matrix.
|
||||
# Molar enthalpy and entropy are set to 0 because the values given in the
|
||||
# BinarySolidSolutionTabulatedThermo class are used.
|
||||
# Density of graphite: 2270 kg/m3 (W. M. Haynes et al, CRC Handbook of Chemistry
|
||||
# and Physics, 94th edition, CRC press, Boca Raton, London, New York, 2013)
|
||||
# (used to calculate species molar volume as molecular weight (MW)/density).
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "Li[anode]",
|
||||
atoms = "Li:1 C:6",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (79.0070/2.270, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Vacancy in graphite, MW: 72.0660 g/mol.
|
||||
# Note this species includes the carbon host matrix.
|
||||
# Molar enthalpy and entropy are set to 0 because this is the reference species
|
||||
# for this phase.
|
||||
# Density of graphite: 2270 kg/m3 (W. M. Haynes et al, CRC Handbook of Chemistry
|
||||
# and Physics, 94th edition, CRC press, Boca Raton, London, New York, 2013)
|
||||
# (used to calculate species molar volume as molecular weight (MW)/density).
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "V[anode]",
|
||||
atoms = "C:6",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (72.0660/2.270, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Lithium cobalt oxide, MW: 97.8730 g/mol.
|
||||
# Note this species includes the cobalt oxide host matrix.
|
||||
# Molar enthalpy and entropy are set to 0 because the values given in the
|
||||
# BinarySolidSolutionTabulatedThermo class are used.
|
||||
# Density of LCO: 4790 kg/m3 (E.J. Cheng et al., J. Asian Ceramic Soc. 5, 113,
|
||||
# 2017) (used to calculate species molar volume as molecular weight/density).
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "Li[cathode]",
|
||||
atoms = "Li:1 Co:1 O:2",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (97.8730/4.790, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Vacancy in the cobalt oxide, MW: 90.9320 g/mol.
|
||||
# Note this species includes the cobalt oxide host matrix.
|
||||
# Molar enthalpy and entropy are set to 0 because this is the reference species
|
||||
# for this phase.
|
||||
# Density of LCO: 4790 kg/m3 (E.J. Cheng et al., J. Asian Ceramic Soc. 5, 113,
|
||||
# 2017) (used to calculate species molar volume as molecular weight/density).
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "V[cathode]",
|
||||
atoms = "Co:1 O:2",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (90.9320/4.790, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Ethylene carbonate, MW: 88.0630 g/mol
|
||||
# Density of electrolyte: 1260 kg/m3 (used to calculate species molar volume
|
||||
# as molecular weight (MW)/density)
|
||||
# Molar enthalpy and entropy set to zero (dummy entries as this species does
|
||||
# not participate in chemical reactions)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "C3H4O3[elyt]",
|
||||
atoms = "C:3 H:4 O:3",
|
||||
thermo = const_cp(h0 =(0.0, 'J/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (88.0630/1.260, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Propylene carbonate, MW: 102.0898 g/mol
|
||||
# Density of electrolyte: 1260.0 kg/m3 (used to calculate species molar volume
|
||||
# as molecular weight (MW)/density)
|
||||
# Molar enthalpy and entropy set to zero (dummy entries as this species does
|
||||
# not participate in chemical reactions)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "C4H6O3[elyt]",
|
||||
atoms = "C:4 H:6 O:3",
|
||||
thermo = const_cp(h0 =(0.0, 'J/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (102.0898/1.260, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Lithium ion, MW: 6.940455 g/mol
|
||||
# Density of electrolyte: 1260.0 kg/m3 (used to calculate species molar volume
|
||||
# as molecular weight (MW)/density)
|
||||
# Molar enthalpy and entropy taken from Li+(aq) from P. Atkins "Physical
|
||||
# Chemistry", Wiley-VCH (2006)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "Li+[elyt]",
|
||||
atoms = "Li:1 E:-1",
|
||||
thermo = const_cp(h0 = (-278.49, 'kJ/mol'), s0 = (13.4, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (6.940455/1.260, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Hexafluorophosphate ion, MW: 144.964745 g/mol
|
||||
# Density of electrolyte: 1260.0 kg/m3 (used to calculate species molar volume
|
||||
# as molecular weight (MW)/density)
|
||||
# Molar enthalpy and entropy set to zero (dummy entries as this species does
|
||||
# not participate in chemical reactions)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "PF6-[elyt]",
|
||||
atoms = "P:1 F:6 E:1",
|
||||
thermo = const_cp(h0 = (0.0, 'J/mol'), s0 = (0.0, 'J/mol/K')),
|
||||
standardState = constantIncompressible(molarVolume = (144.964745/1.260, 'cm3/mol')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Electron, MW: 0.000545 g/mol
|
||||
# Molar enthalpy and entropy set to zero (dummy entries because chemical
|
||||
# potential is set to zero for a "metal" phase)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "electron",
|
||||
atoms = "E:1",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Dummy species (needed for defining the interfaces)
|
||||
#------------------------------------------------------------------------------
|
||||
species(
|
||||
name = "(dummy)",
|
||||
atoms = "",
|
||||
thermo = const_cp(h0 = (0.0, 'kJ/mol'), s0 = (0.0, 'J/mol/K')))
|
||||
|
||||
|
||||
#==============================================================================
|
||||
# Interfaces for electrochemical reactions
|
||||
#==============================================================================
|
||||
#------------------------------------------------------------------------------
|
||||
# Graphite/electrolyte interface
|
||||
# Species and site density are dummy entries (as we do not consider surface-
|
||||
# adsorbed species)
|
||||
#------------------------------------------------------------------------------
|
||||
ideal_interface(
|
||||
name = "edge_anode_electrolyte",
|
||||
phases = "anode electron electrolyte",
|
||||
reactions = "anode_*",
|
||||
species = "(dummy)",
|
||||
site_density = (1.0e-2, 'mol/cm2'))
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# LCO/electrolyte interface
|
||||
# Species and site density are dummy entries (as we do not consider surface-
|
||||
# adsorbed species)
|
||||
#------------------------------------------------------------------------------
|
||||
ideal_interface(
|
||||
name = "edge_cathode_electrolyte",
|
||||
phases = "cathode electron electrolyte",
|
||||
reactions = "cathode_*",
|
||||
species = "(dummy)",
|
||||
site_density = (1.0e-2, 'mol/cm2'))
|
||||
|
||||
|
||||
#==============================================================================
|
||||
# Electrochemical reactions
|
||||
#
|
||||
# We use Butler-Volmer kinetics by setting rate_coeff_type = "exchangecurrentdensity".
|
||||
# The preexponential factors and activation energies are converted from
|
||||
# Guo et al., J. Electrochem. Soc. 158, A122 (2011)
|
||||
#==============================================================================
|
||||
|
||||
# Graphite/electrolyte interface
|
||||
edge_reaction("Li+[elyt] + V[anode] + electron <=> Li[anode]", [2.028e4, 0.0, (20, 'kJ/mol')], rate_coeff_type = "exchangecurrentdensity", beta = 0.5,id="anode_reaction")
|
||||
|
||||
# LCO/electrolyte interface
|
||||
edge_reaction("Li+[elyt] + V[cathode] + electron <=> Li[cathode]", [5.629e11, 0.0, (58, 'kJ/mol')], rate_coeff_type = "exchangecurrentdensity", beta = 0.5,id="cathode_reaction")
|
||||
|
||||
3123
data/inputs/nDodecane_Reitz.cti
Normal file
3123
data/inputs/nDodecane_Reitz.cti
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
12862
data/inputs/nasa_gas.xml
12862
data/inputs/nasa_gas.xml
File diff suppressed because it is too large
Load diff
|
|
@ -108,10 +108,10 @@ species( name = "electron", atoms = "E:1",
|
|||
# consider the oxygen sublattice. The only species we define are a
|
||||
# lattice oxygen, and an oxygen vacancy. Again, the density is a
|
||||
# required input, but is not used here, so may be set arbitrarily.
|
||||
incompressible_solid(name = "oxide_bulk",
|
||||
lattice(name = "oxide_bulk",
|
||||
elements = "O E",
|
||||
species = "Ox VO**",
|
||||
density = (0.7, 'g/cm3'),
|
||||
site_density = (0.0176, 'mol/cm3'),
|
||||
initial_state = state( temperature = tt,
|
||||
pressure = OneAtm,
|
||||
mole_fractions = "Ox:0.95 VO**:0.05")
|
||||
222
data/thermo/gri30_thermo.dat
Normal file
222
data/thermo/gri30_thermo.dat
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
THERMO
|
||||
300.000 1000.000 5000.000
|
||||
! GRI-Mech Version 3.0 Thermodynamics released 7/30/99
|
||||
! NASA Polynomial format for CHEMKIN-II
|
||||
! see README file for disclaimer
|
||||
O L 1/90O 1 G 200.000 3500.000 1000.000 1
|
||||
2.56942078E+00-8.59741137E-05 4.19484589E-08-1.00177799E-11 1.22833691E-15 2
|
||||
2.92175791E+04 4.78433864E+00 3.16826710E+00-3.27931884E-03 6.64306396E-06 3
|
||||
-6.12806624E-09 2.11265971E-12 2.91222592E+04 2.05193346E+00 4
|
||||
O2 TPIS89O 2 G 200.000 3500.000 1000.000 1
|
||||
3.28253784E+00 1.48308754E-03-7.57966669E-07 2.09470555E-10-2.16717794E-14 2
|
||||
-1.08845772E+03 5.45323129E+00 3.78245636E+00-2.99673416E-03 9.84730201E-06 3
|
||||
-9.68129509E-09 3.24372837E-12-1.06394356E+03 3.65767573E+00 4
|
||||
H L 7/88H 1 G 200.000 3500.000 1000.000 1
|
||||
2.50000001E+00-2.30842973E-11 1.61561948E-14-4.73515235E-18 4.98197357E-22 2
|
||||
2.54736599E+04-4.46682914E-01 2.50000000E+00 7.05332819E-13-1.99591964E-15 3
|
||||
2.30081632E-18-9.27732332E-22 2.54736599E+04-4.46682853E-01 4
|
||||
H2 TPIS78H 2 G 200.000 3500.000 1000.000 1
|
||||
3.33727920E+00-4.94024731E-05 4.99456778E-07-1.79566394E-10 2.00255376E-14 2
|
||||
-9.50158922E+02-3.20502331E+00 2.34433112E+00 7.98052075E-03-1.94781510E-05 3
|
||||
2.01572094E-08-7.37611761E-12-9.17935173E+02 6.83010238E-01 4
|
||||
OH RUS 78O 1H 1 G 200.000 3500.000 1000.000 1
|
||||
3.09288767E+00 5.48429716E-04 1.26505228E-07-8.79461556E-11 1.17412376E-14 2
|
||||
3.85865700E+03 4.47669610E+00 3.99201543E+00-2.40131752E-03 4.61793841E-06 3
|
||||
-3.88113333E-09 1.36411470E-12 3.61508056E+03-1.03925458E-01 4
|
||||
H2O L 8/89H 2O 1 G 200.000 3500.000 1000.000 1
|
||||
3.03399249E+00 2.17691804E-03-1.64072518E-07-9.70419870E-11 1.68200992E-14 2
|
||||
-3.00042971E+04 4.96677010E+00 4.19864056E+00-2.03643410E-03 6.52040211E-06 3
|
||||
-5.48797062E-09 1.77197817E-12-3.02937267E+04-8.49032208E-01 4
|
||||
HO2 L 5/89H 1O 2 G 200.000 3500.000 1000.000 1
|
||||
4.01721090E+00 2.23982013E-03-6.33658150E-07 1.14246370E-10-1.07908535E-14 2
|
||||
1.11856713E+02 3.78510215E+00 4.30179801E+00-4.74912051E-03 2.11582891E-05 3
|
||||
-2.42763894E-08 9.29225124E-12 2.94808040E+02 3.71666245E+00 4
|
||||
H2O2 L 7/88H 2O 2 G 200.000 3500.000 1000.000 1
|
||||
4.16500285E+00 4.90831694E-03-1.90139225E-06 3.71185986E-10-2.87908305E-14 2
|
||||
-1.78617877E+04 2.91615662E+00 4.27611269E+00-5.42822417E-04 1.67335701E-05 3
|
||||
-2.15770813E-08 8.62454363E-12-1.77025821E+04 3.43505074E+00 4
|
||||
C L11/88C 1 G 200.000 3500.000 1000.000 1
|
||||
2.49266888E+00 4.79889284E-05-7.24335020E-08 3.74291029E-11-4.87277893E-15 2
|
||||
8.54512953E+04 4.80150373E+00 2.55423955E+00-3.21537724E-04 7.33792245E-07 3
|
||||
-7.32234889E-10 2.66521446E-13 8.54438832E+04 4.53130848E+00 4
|
||||
CH TPIS79C 1H 1 G 200.000 3500.000 1000.000 1
|
||||
2.87846473E+00 9.70913681E-04 1.44445655E-07-1.30687849E-10 1.76079383E-14 2
|
||||
7.10124364E+04 5.48497999E+00 3.48981665E+00 3.23835541E-04-1.68899065E-06 3
|
||||
3.16217327E-09-1.40609067E-12 7.07972934E+04 2.08401108E+00 4
|
||||
CH2 L S/93C 1H 2 G 200.000 3500.000 1000.000 1
|
||||
2.87410113E+00 3.65639292E-03-1.40894597E-06 2.60179549E-10-1.87727567E-14 2
|
||||
4.62636040E+04 6.17119324E+00 3.76267867E+00 9.68872143E-04 2.79489841E-06 3
|
||||
-3.85091153E-09 1.68741719E-12 4.60040401E+04 1.56253185E+00 4
|
||||
CH2(S) L S/93C 1H 2 G 200.000 3500.000 1000.000 1
|
||||
2.29203842E+00 4.65588637E-03-2.01191947E-06 4.17906000E-10-3.39716365E-14 2
|
||||
5.09259997E+04 8.62650169E+00 4.19860411E+00-2.36661419E-03 8.23296220E-06 3
|
||||
-6.68815981E-09 1.94314737E-12 5.04968163E+04-7.69118967E-01 4
|
||||
CH3 L11/89C 1H 3 G 200.000 3500.000 1000.000 1
|
||||
2.28571772E+00 7.23990037E-03-2.98714348E-06 5.95684644E-10-4.67154394E-14 2
|
||||
1.67755843E+04 8.48007179E+00 3.67359040E+00 2.01095175E-03 5.73021856E-06 3
|
||||
-6.87117425E-09 2.54385734E-12 1.64449988E+04 1.60456433E+00 4
|
||||
CH4 L 8/88C 1H 4 G 200.000 3500.000 1000.000 1
|
||||
7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2
|
||||
-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3
|
||||
-4.84743026E-08 1.66693956E-11-1.02466476E+04-4.64130376E+00 4
|
||||
CO TPIS79C 1O 1 G 200.000 3500.000 1000.000 1
|
||||
2.71518561E+00 2.06252743E-03-9.98825771E-07 2.30053008E-10-2.03647716E-14 2
|
||||
-1.41518724E+04 7.81868772E+00 3.57953347E+00-6.10353680E-04 1.01681433E-06 3
|
||||
9.07005884E-10-9.04424499E-13-1.43440860E+04 3.50840928E+00 4
|
||||
CO2 L 7/88C 1O 2 G 200.000 3500.000 1000.000 1
|
||||
3.85746029E+00 4.41437026E-03-2.21481404E-06 5.23490188E-10-4.72084164E-14 2
|
||||
-4.87591660E+04 2.27163806E+00 2.35677352E+00 8.98459677E-03-7.12356269E-06 3
|
||||
2.45919022E-09-1.43699548E-13-4.83719697E+04 9.90105222E+00 4
|
||||
HCO L12/89H 1C 1O 1 G 200.000 3500.000 1000.000 1
|
||||
2.77217438E+00 4.95695526E-03-2.48445613E-06 5.89161778E-10-5.33508711E-14 2
|
||||
4.01191815E+03 9.79834492E+00 4.22118584E+00-3.24392532E-03 1.37799446E-05 3
|
||||
-1.33144093E-08 4.33768865E-12 3.83956496E+03 3.39437243E+00 4
|
||||
CH2O L 8/88H 2C 1O 1 G 200.000 3500.000 1000.000 1
|
||||
1.76069008E+00 9.20000082E-03-4.42258813E-06 1.00641212E-09-8.83855640E-14 2
|
||||
-1.39958323E+04 1.36563230E+01 4.79372315E+00-9.90833369E-03 3.73220008E-05 3
|
||||
-3.79285261E-08 1.31772652E-11-1.43089567E+04 6.02812900E-01 4
|
||||
CH2OH GUNL93C 1H 3O 1 G 200.000 3500.000 1000.000 1
|
||||
3.69266569E+00 8.64576797E-03-3.75101120E-06 7.87234636E-10-6.48554201E-14 2
|
||||
-3.24250627E+03 5.81043215E+00 3.86388918E+00 5.59672304E-03 5.93271791E-06 3
|
||||
-1.04532012E-08 4.36967278E-12-3.19391367E+03 5.47302243E+00 4
|
||||
CH3O 121686C 1H 3O 1 G 300.00 3000.00 1000.000 1
|
||||
0.03770799E+02 0.07871497E-01-0.02656384E-04 0.03944431E-08-0.02112616E-12 2
|
||||
0.12783252E+03 0.02929575E+02 0.02106204E+02 0.07216595E-01 0.05338472E-04 3
|
||||
-0.07377636E-07 0.02075610E-10 0.09786011E+04 0.13152177E+02 4
|
||||
CH3OH L 8/88C 1H 4O 1 G 200.000 3500.000 1000.000 1
|
||||
1.78970791E+00 1.40938292E-02-6.36500835E-06 1.38171085E-09-1.17060220E-13 2
|
||||
-2.53748747E+04 1.45023623E+01 5.71539582E+00-1.52309129E-02 6.52441155E-05 3
|
||||
-7.10806889E-08 2.61352698E-11-2.56427656E+04-1.50409823E+00 4
|
||||
C2H L 1/91C 2H 1 G 200.000 3500.000 1000.000 1
|
||||
3.16780652E+00 4.75221902E-03-1.83787077E-06 3.04190252E-10-1.77232770E-14 2
|
||||
6.71210650E+04 6.63589475E+00 2.88965733E+00 1.34099611E-02-2.84769501E-05 3
|
||||
2.94791045E-08-1.09331511E-11 6.68393932E+04 6.22296438E+00 4
|
||||
C2H2 L 1/91C 2H 2 G 200.000 3500.000 1000.000 1
|
||||
4.14756964E+00 5.96166664E-03-2.37294852E-06 4.67412171E-10-3.61235213E-14 2
|
||||
2.59359992E+04-1.23028121E+00 8.08681094E-01 2.33615629E-02-3.55171815E-05 3
|
||||
2.80152437E-08-8.50072974E-12 2.64289807E+04 1.39397051E+01 4
|
||||
C2H3 L 2/92C 2H 3 G 200.000 3500.000 1000.000 1
|
||||
3.01672400E+00 1.03302292E-02-4.68082349E-06 1.01763288E-09-8.62607041E-14 2
|
||||
3.46128739E+04 7.78732378E+00 3.21246645E+00 1.51479162E-03 2.59209412E-05 3
|
||||
-3.57657847E-08 1.47150873E-11 3.48598468E+04 8.51054025E+00 4
|
||||
C2H4 L 1/91C 2H 4 G 200.000 3500.000 1000.000 1
|
||||
2.03611116E+00 1.46454151E-02-6.71077915E-06 1.47222923E-09-1.25706061E-13 2
|
||||
4.93988614E+03 1.03053693E+01 3.95920148E+00-7.57052247E-03 5.70990292E-05 3
|
||||
-6.91588753E-08 2.69884373E-11 5.08977593E+03 4.09733096E+00 4
|
||||
C2H5 L12/92C 2H 5 G 200.000 3500.000 1000.000 1
|
||||
1.95465642E+00 1.73972722E-02-7.98206668E-06 1.75217689E-09-1.49641576E-13 2
|
||||
1.28575200E+04 1.34624343E+01 4.30646568E+00-4.18658892E-03 4.97142807E-05 3
|
||||
-5.99126606E-08 2.30509004E-11 1.28416265E+04 4.70720924E+00 4
|
||||
C2H6 L 8/88C 2H 6 G 200.000 3500.000 1000.000 1
|
||||
1.07188150E+00 2.16852677E-02-1.00256067E-05 2.21412001E-09-1.90002890E-13 2
|
||||
-1.14263932E+04 1.51156107E+01 4.29142492E+00-5.50154270E-03 5.99438288E-05 3
|
||||
-7.08466285E-08 2.68685771E-11-1.15222055E+04 2.66682316E+00 4
|
||||
CH2CO L 5/90C 2H 2O 1 G 200.000 3500.000 1000.000 1
|
||||
4.51129732E+00 9.00359745E-03-4.16939635E-06 9.23345882E-10-7.94838201E-14 2
|
||||
-7.55105311E+03 6.32247205E-01 2.13583630E+00 1.81188721E-02-1.73947474E-05 3
|
||||
9.34397568E-09-2.01457615E-12-7.04291804E+03 1.22156480E+01 4
|
||||
HCCO SRIC91H 1C 2O 1 G 300.00 4000.00 1000.000 1
|
||||
0.56282058E+01 0.40853401E-02-0.15934547E-05 0.28626052E-09-0.19407832E-13 2
|
||||
0.19327215E+05-0.39302595E+01 0.22517214E+01 0.17655021E-01-0.23729101E-04 3
|
||||
0.17275759E-07-0.50664811E-11 0.20059449E+05 0.12490417E+02 4
|
||||
HCCOH SRI91C 2O 1H 2 G 300.000 5000.000 1000.000 1
|
||||
0.59238291E+01 0.67923600E-02-0.25658564E-05 0.44987841E-09-0.29940101E-13 2
|
||||
0.72646260E+04-0.76017742E+01 0.12423733E+01 0.31072201E-01-0.50866864E-04 3
|
||||
0.43137131E-07-0.14014594E-10 0.80316143E+04 0.13874319E+02 4
|
||||
H2CN 41687H 2C 1N 1 G 300.00 4000.000 1000.000 1
|
||||
0.52097030E+01 0.29692911E-02-0.28555891E-06-0.16355500E-09 0.30432589E-13 2
|
||||
0.27677109E+05-0.44444780E+01 0.28516610E+01 0.56952331E-02 0.10711400E-05 3
|
||||
-0.16226120E-08-0.23511081E-12 0.28637820E+05 0.89927511E+01 4
|
||||
HCN GRI/98H 1C 1N 1 G 200.000 6000.000 1000.000 1
|
||||
0.38022392E+01 0.31464228E-02-0.10632185E-05 0.16619757E-09-0.97997570E-14 2
|
||||
0.14407292E+05 0.15754601E+01 0.22589886E+01 0.10051170E-01-0.13351763E-04 3
|
||||
0.10092349E-07-0.30089028E-11 0.14712633E+05 0.89164419E+01 4
|
||||
HNO And93 H 1N 1O 1 G 200.000 6000.000 1000.000 1
|
||||
0.29792509E+01 0.34944059E-02-0.78549778E-06 0.57479594E-10-0.19335916E-15 2
|
||||
0.11750582E+05 0.86063728E+01 0.45334916E+01-0.56696171E-02 0.18473207E-04 3
|
||||
-0.17137094E-07 0.55454573E-11 0.11548297E+05 0.17498417E+01 4
|
||||
N L 6/88N 1 G 200.000 6000.000 1000.000 1
|
||||
0.24159429E+01 0.17489065E-03-0.11902369E-06 0.30226245E-10-0.20360982E-14 2
|
||||
0.56133773E+05 0.46496096E+01 0.25000000E+01 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00 0.56104637E+05 0.41939087E+01 4
|
||||
NNH T07/93N 2H 1 G 200.000 6000.000 1000.000 1
|
||||
0.37667544E+01 0.28915082E-02-0.10416620E-05 0.16842594E-09-0.10091896E-13 2
|
||||
0.28650697E+05 0.44705067E+01 0.43446927E+01-0.48497072E-02 0.20059459E-04 3
|
||||
-0.21726464E-07 0.79469539E-11 0.28791973E+05 0.29779410E+01 4
|
||||
N2O L 7/88N 2O 1 G 200.000 6000.000 1000.000 1
|
||||
0.48230729E+01 0.26270251E-02-0.95850874E-06 0.16000712E-09-0.97752303E-14 2
|
||||
0.80734048E+04-0.22017207E+01 0.22571502E+01 0.11304728E-01-0.13671319E-04 3
|
||||
0.96819806E-08-0.29307182E-11 0.87417744E+04 0.10757992E+02 4
|
||||
NH And94 N 1H 1 G 200.000 6000.000 1000.000 1
|
||||
0.27836928E+01 0.13298430E-02-0.42478047E-06 0.78348501E-10-0.55044470E-14 2
|
||||
0.42120848E+05 0.57407799E+01 0.34929085E+01 0.31179198E-03-0.14890484E-05 3
|
||||
0.24816442E-08-0.10356967E-11 0.41880629E+05 0.18483278E+01 4
|
||||
NH2 And89 N 1H 2 G 200.000 6000.000 1000.000 1
|
||||
0.28347421E+01 0.32073082E-02-0.93390804E-06 0.13702953E-09-0.79206144E-14 2
|
||||
0.22171957E+05 0.65204163E+01 0.42040029E+01-0.21061385E-02 0.71068348E-05 3
|
||||
-0.56115197E-08 0.16440717E-11 0.21885910E+05-0.14184248E+00 4
|
||||
NH3 J 6/77N 1H 3 G 200.000 6000.000 1000.000 1
|
||||
0.26344521E+01 0.56662560E-02-0.17278676E-05 0.23867161E-09-0.12578786E-13 2
|
||||
-0.65446958E+04 0.65662928E+01 0.42860274E+01-0.46605230E-02 0.21718513E-04 3
|
||||
-0.22808887E-07 0.82638046E-11-0.67417285E+04-0.62537277E+00 4
|
||||
NO RUS 78N 1O 1 G 200.000 6000.000 1000.000 1
|
||||
0.32606056E+01 0.11911043E-02-0.42917048E-06 0.69457669E-10-0.40336099E-14 2
|
||||
0.99209746E+04 0.63693027E+01 0.42184763E+01-0.46389760E-02 0.11041022E-04 3
|
||||
-0.93361354E-08 0.28035770E-11 0.98446230E+04 0.22808464E+01 4
|
||||
NO2 L 7/88N 1O 2 G 200.000 6000.000 1000.000 1
|
||||
0.48847542E+01 0.21723956E-02-0.82806906E-06 0.15747510E-09-0.10510895E-13 2
|
||||
0.23164983E+04-0.11741695E+00 0.39440312E+01-0.15854290E-02 0.16657812E-04 3
|
||||
-0.20475426E-07 0.78350564E-11 0.28966179E+04 0.63119917E+01 4
|
||||
HCNO BDEA94H 1N 1C 1O 1G 300.000 5000.000 1382.000 1
|
||||
6.59860456E+00 3.02778626E-03-1.07704346E-06 1.71666528E-10-1.01439391E-14 2
|
||||
1.79661339E+04-1.03306599E+01 2.64727989E+00 1.27505342E-02-1.04794236E-05 3
|
||||
4.41432836E-09-7.57521466E-13 1.92990252E+04 1.07332972E+01 4
|
||||
HOCN BDEA94H 1N 1C 1O 1G 300.000 5000.000 1368.000 1
|
||||
5.89784885E+00 3.16789393E-03-1.11801064E-06 1.77243144E-10-1.04339177E-14 2
|
||||
-3.70653331E+03-6.18167825E+00 3.78604952E+00 6.88667922E-03-3.21487864E-06 3
|
||||
5.17195767E-10 1.19360788E-14-2.82698400E+03 5.63292162E+00 4
|
||||
HNCO BDEA94H 1N 1C 1O 1G 300.000 5000.000 1478.000 1
|
||||
6.22395134E+00 3.17864004E-03-1.09378755E-06 1.70735163E-10-9.95021955E-15 2
|
||||
-1.66599344E+04-8.38224741E+00 3.63096317E+00 7.30282357E-03-2.28050003E-06 3
|
||||
-6.61271298E-10 3.62235752E-13-1.55873636E+04 6.19457727E+00 4
|
||||
NCO EA 93 N 1C 1O 1 G 200.000 6000.000 1000.000 1
|
||||
0.51521845E+01 0.23051761E-02-0.88033153E-06 0.14789098E-09-0.90977996E-14 2
|
||||
0.14004123E+05-0.25442660E+01 0.28269308E+01 0.88051688E-02-0.83866134E-05 3
|
||||
0.48016964E-08-0.13313595E-11 0.14682477E+05 0.95504646E+01 4
|
||||
CN HBH92 C 1N 1 G 200.000 6000.000 1000.000 1
|
||||
0.37459805E+01 0.43450775E-04 0.29705984E-06-0.68651806E-10 0.44134173E-14 2
|
||||
0.51536188E+05 0.27867601E+01 0.36129351E+01-0.95551327E-03 0.21442977E-05 3
|
||||
-0.31516323E-09-0.46430356E-12 0.51708340E+05 0.39804995E+01 4
|
||||
HCNN SRI/94C 1N 2H 1 G 300.000 5000.000 1000.000 1
|
||||
0.58946362E+01 0.39895959E-02-0.15982380E-05 0.29249395E-09-0.20094686E-13 2
|
||||
0.53452941E+05-0.51030502E+01 0.25243194E+01 0.15960619E-01-0.18816354E-04 3
|
||||
0.12125540E-07-0.32357378E-11 0.54261984E+05 0.11675870E+02 4
|
||||
N2 121286N 2 G 300.000 5000.000 1000.000 1
|
||||
0.02926640E+02 0.14879768E-02-0.05684760E-05 0.10097038E-09-0.06753351E-13 2
|
||||
-0.09227977E+04 0.05980528E+02 0.03298677E+02 0.14082404E-02-0.03963222E-04 3
|
||||
0.05641515E-07-0.02444854E-10-0.10208999E+04 0.03950372E+02 4
|
||||
AR 120186AR 1 G 300.000 5000.000 1000.000 1
|
||||
0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2
|
||||
-0.07453750E+04 0.04366000E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00-0.07453750E+04 0.04366000E+02 4
|
||||
C3H8 L 4/85C 3H 8 G 300.000 5000.000 1000.000 1
|
||||
0.75341368E+01 0.18872239E-01-0.62718491E-05 0.91475649E-09-0.47838069E-13 2
|
||||
-0.16467516E+05-0.17892349E+02 0.93355381E+00 0.26424579E-01 0.61059727E-05 3
|
||||
-0.21977499E-07 0.95149253E-11-0.13958520E+05 0.19201691E+02 4
|
||||
C3H7 L 9/84C 3H 7 G 300.000 5000.000 1000.000 1
|
||||
0.77026987E+01 0.16044203E-01-0.52833220E-05 0.76298590E-09-0.39392284E-13 2
|
||||
0.82984336E+04-0.15480180E+02 0.10515518E+01 0.25991980E-01 0.23800540E-05 3
|
||||
-0.19609569E-07 0.93732470E-11 0.10631863E+05 0.21122559E+02 4
|
||||
CH3CHO L 8/88C 2H 4O 1 G 200.000 6000.000 1000.000 1
|
||||
0.54041108E+01 0.11723059E-01-0.42263137E-05 0.68372451E-09-0.40984863E-13 2
|
||||
-0.22593122E+05-0.34807917E+01 0.47294595E+01-0.31932858E-02 0.47534921E-04 3
|
||||
-0.57458611E-07 0.21931112E-10-0.21572878E+05 0.41030159E+01 4
|
||||
CH2CHO SAND86O 1H 3C 2 G 300.000 5000.000 1000.000 1
|
||||
0.05975670E+02 0.08130591E-01-0.02743624E-04 0.04070304E-08-0.02176017E-12 2
|
||||
0.04903218E+04-0.05045251E+02 0.03409062E+02 0.10738574E-01 0.01891492E-04 3
|
||||
-0.07158583E-07 0.02867385E-10 0.15214766E+04 0.09558290E+02 4
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1849,7 +1849,7 @@ LiO J 3/64LI 1.O 1. 0. 0.G 300.000 5000.000 22.94040 1
|
|||
LiO- J12/67LI 1.O 1.E 1. 0.G 300.000 5000.000 22.94095 1
|
||||
4.18102170E+00 4.17850000E-04-1.50248450E-07 2.83977320E-11-1.97891810E-15 2
|
||||
-9.38497020E+03-1.42392337E-01 2.85158660E+00 5.01698800E-03-5.95474750E-06 3
|
||||
03994510E-09-4.78729690E-13-9.07780760E+03 6.45947067E+00-8.05144594E+03 4
|
||||
3.03994510E-09-4.78729690E-13-9.07780760E+03 6.45947067E+00-8.05144594E+03 4
|
||||
LiOH J 6/71LI 1.O 1.H 1. 0.G 300.000 5000.000 23.94834 1
|
||||
5.50969570E+00 1.36854640E-03-3.94414690E-07 5.23321950E-11-2.59586760E-15 2
|
||||
-2.98992310E+04-6.50701600E+00 3.34623000E+00 1.17872530E-02-1.82526570E-05 3
|
||||
|
|
|
|||
148
doc/SConscript
148
doc/SConscript
|
|
@ -1,5 +1,5 @@
|
|||
from __future__ import print_function
|
||||
from buildutils import *
|
||||
import ast
|
||||
|
||||
Import('env', 'build', 'install')
|
||||
|
||||
|
|
@ -8,37 +8,6 @@ localenv = env.Clone()
|
|||
from collections import namedtuple
|
||||
Page = namedtuple('Page', ['name', 'title', 'objects'])
|
||||
|
||||
def extract_python_docstring(pyfile, summary_only=True):
|
||||
""" Returns the docstring from a Python script """
|
||||
with open(pyfile) as f:
|
||||
mod = ast.parse(f.read())
|
||||
doc = ''
|
||||
for node in mod.body:
|
||||
if isinstance(node, ast.Expr) and isinstance(node.value, ast.Str):
|
||||
doc = node.value.s
|
||||
|
||||
doc = doc.strip()
|
||||
|
||||
if summary_only:
|
||||
doc = doc.split('\n\n')[0]
|
||||
|
||||
return doc
|
||||
|
||||
def extract_matlab_summary(mfile):
|
||||
""" Returns a one-line summary comment from a .m file """
|
||||
doc = ''
|
||||
with open(mfile) as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line.startswith('%'):
|
||||
doc = line.strip('%').strip()
|
||||
if doc:
|
||||
break
|
||||
name = os.path.basename(mfile)[:-2].replace('_', ' ')
|
||||
if doc.lower().replace('_', ' ').startswith(name):
|
||||
doc = doc[len(name):].strip()
|
||||
return doc
|
||||
|
||||
|
||||
# Set up functions to pseudo-autodoc the MATLAB toolbox
|
||||
def extract_matlab_docstring(mfile, level):
|
||||
|
|
@ -60,7 +29,7 @@ def extract_matlab_docstring(mfile, level):
|
|||
elif level == 1:
|
||||
docstring = " .. mat:function:: "
|
||||
else:
|
||||
print "Unknown level for MATLAB documentation."
|
||||
print("Unknown level for MATLAB documentation.")
|
||||
sys.exit(1)
|
||||
|
||||
# The leader is the number of spaces at the beginning of a regular line
|
||||
|
|
@ -99,9 +68,10 @@ def extract_matlab_docstring(mfile, level):
|
|||
|
||||
return docstring + '\n'
|
||||
|
||||
|
||||
def get_function_name(str):
|
||||
"""
|
||||
Return the function or classdef signature, assuming that
|
||||
Return the Matlab function or classdef signature, assuming that
|
||||
the string starts with either 'function ' or 'classdef '.
|
||||
"""
|
||||
if str.startswith('function '):
|
||||
|
|
@ -109,7 +79,7 @@ def get_function_name(str):
|
|||
elif str.startswith('classdef '):
|
||||
sig = str[len('classdef '):]
|
||||
else:
|
||||
print "Unknown function declaration in MATLAB document", str
|
||||
print("Unknown function declaration in MATLAB document", str)
|
||||
|
||||
# Split the function signature on the equals sign, if it exists.
|
||||
# We don't care about what comes before the equals sign, since
|
||||
|
|
@ -130,8 +100,8 @@ if localenv['doxygen_docs']:
|
|||
mglob(env, '#src/cantera/*', 'h', 'cpp'))
|
||||
|
||||
env.Alias('doxygen', docs)
|
||||
install('$inst_docdir/doxygen/html',
|
||||
mglob(localenv, '#/build/docs/doxygen/html', 'html', 'svg', 'css', 'png'))
|
||||
install(localenv.RecursiveInstall, '$inst_docdir/doxygen/html',
|
||||
'#/build/docs/doxygen/html', exclude=['\\.map', '\\.md5'])
|
||||
|
||||
if localenv['sphinx_docs']:
|
||||
localenv['SPHINXBUILD'] = Dir('#build/docs/sphinx')
|
||||
|
|
@ -142,78 +112,44 @@ if localenv['sphinx_docs']:
|
|||
'${sphinx_cmd} -b html -d ${SPHINXBUILD}/doctrees ${SPHINXSRC} ${SPHINXBUILD}/html'))
|
||||
env.Alias('sphinx', sphinxdocs)
|
||||
|
||||
# Python examples: Create individual documentation pages with the source
|
||||
# for each example
|
||||
example_root = Dir('#interfaces/cython/cantera/examples').abspath
|
||||
indexenv = env.Clone()
|
||||
for subdir in subdirs(example_root):
|
||||
summaries = []
|
||||
for f in mglob(env, pjoin(example_root, subdir), 'py'):
|
||||
docname = 'examples/{0}_{1}'.format(subdir, f.name[:-3])
|
||||
summaries.append(':doc:`{0} <{1}>`:'.format(f.name, docname))
|
||||
summaries.append(extract_python_docstring(f.abspath))
|
||||
summaries.append('')
|
||||
|
||||
tmpenv = env.Clone()
|
||||
tmpenv['script_name'] = f.name
|
||||
tmpenv['script_path'] = '../../../../interfaces/cython/cantera/examples/%s/%s' % (subdir, f.name)
|
||||
b = tmpenv.SubstFile('#doc/sphinx/cython/{0}.rst'.format(docname),
|
||||
'#doc/sphinx/cython/example-script.rst.in')
|
||||
build(b)
|
||||
localenv.Depends(sphinxdocs, b)
|
||||
indexenv['python_{0}_examples'.format(subdir)] = '\n'.join(summaries)
|
||||
b = indexenv.SubstFile('#doc/sphinx/cython/examples.rst',
|
||||
'#doc/sphinx/cython/examples.rst.in')
|
||||
build(b)
|
||||
localenv.Depends(sphinxdocs, b)
|
||||
|
||||
# Create a list of MATLAB classes to document. This uses the NamedTuple
|
||||
# structure defined at the top of the file. The @Data and @Utilities
|
||||
# classes are fake classes for the purposes of documentation only. Each
|
||||
# Page represents one html page of the documentation.
|
||||
pages = [
|
||||
Page('importing', 'Importing Phase Objects',
|
||||
['@Solution', '@Mixture',]
|
||||
),
|
||||
Page('importing', 'Objects Representing Phases',
|
||||
['@Solution', '@Mixture', '@Interface', '@Pure Fluid Phases']),
|
||||
Page('thermodynamics', 'Thermodynamic Properties',
|
||||
['@ThermoPhase']
|
||||
),
|
||||
['@ThermoPhase']),
|
||||
Page('kinetics', 'Chemical Kinetics', ['@Kinetics']),
|
||||
Page('transport', 'Transport Properties', ['@Transport']),
|
||||
Page('zero-dim', 'Zero-Dimensional Reactor Networks',
|
||||
['@Func', '@Reactor', '@ReactorNet', '@FlowDevice', '@Wall']
|
||||
),
|
||||
Page('one-dim', 'One-Dimensional Reacting Flows',
|
||||
['1D/@Domain1D', '1D/@Stack']
|
||||
),
|
||||
Page('data', 'Built-In Thermochemical Data',
|
||||
['@Data']
|
||||
),
|
||||
Page('utilities', 'Utility Functions',
|
||||
['@Utilities', '@XML_Node']
|
||||
),
|
||||
Page('interface', 'Interfaces', ['@Interface']),
|
||||
['@Func', '@Reactor', '@ReactorNet', '@FlowDevice', '@Wall']),
|
||||
Page('one-dim', 'One-Dimensional Reacting Flows', ['1D/@Domain1D', '1D/@Stack']),
|
||||
Page('data', 'Physical Constants', ['@Data']),
|
||||
Page('utilities', 'Utility Functions', ['@Utilities', '@XML_Node']),
|
||||
]
|
||||
|
||||
# Create a dictionary of extra files associated with each class. These
|
||||
# files are listed relative to the top directory interfaces/matlab/cantera
|
||||
extra = {
|
||||
'@Solution': ['IdealGasMix.m', 'importPhase.m',],
|
||||
'@Solution': ['IdealGasMix.m', 'GRI30.m', 'Air.m'],
|
||||
'@Pure Fluid Phases': ['CarbonDioxide.m', 'HFC134a.m', 'Hydrogen.m',
|
||||
'Methane.m', 'Nitrogen.m', 'Oxygen.m', 'Water.m'],
|
||||
'@Func': ['gaussian.m', 'polynom.m'],
|
||||
'@Reactor': ['ConstPressureReactor.m',
|
||||
'FlowReactor.m', 'IdealGasConstPressureReactor.m',
|
||||
'IdealGasReactor.m', 'Reservoir.m'],
|
||||
'FlowReactor.m', 'IdealGasConstPressureReactor.m',
|
||||
'IdealGasReactor.m', 'Reservoir.m'],
|
||||
'@FlowDevice': ['MassFlowController.m', 'Valve.m'],
|
||||
'1D/@Domain1D': ['1D/AxiStagnFlow.m', '1D/AxisymmetricFlow.m',
|
||||
'1D/Inlet.m', '1D/Outlet.m', '1D/OutletRes.m',
|
||||
'1D/Surface.m', '1D/SymmPlane.m'],
|
||||
'1D/@Stack': ['1D/FreeFlame.m', '1D/npflame_init.m'],
|
||||
'1D/Inlet.m', '1D/Outlet.m', '1D/OutletRes.m',
|
||||
'1D/Surface.m', '1D/SymmPlane.m'],
|
||||
'1D/@Stack': ['1D/FreeFlame.m', '1D/CounterFlowDiffusionFlame.m'],
|
||||
'@Interface': ['importEdge.m', 'importInterface.m'],
|
||||
'@Data': ['Air.m', 'constants.m', 'gasconstant.m', 'GRI30.m',
|
||||
'Hydrogen.m', 'Methane.m', 'Nitrogen.m', 'oneatm.m',
|
||||
'Oxygen.m', 'Water.m'],
|
||||
'@Data': ['gasconstant.m', 'oneatm.m'],
|
||||
'@Utilities': ['adddir.m', 'ck2cti.m', 'cleanup.m', 'geterr.m',
|
||||
'getDataDirectories.m', 'canteraVersion.m']
|
||||
'getDataDirectories.m', 'canteraVersion.m',
|
||||
'canteraGitCommit.m']
|
||||
}
|
||||
|
||||
# These files do not need to be documented in the MATLAB classes because they
|
||||
|
|
@ -228,7 +164,7 @@ if localenv['sphinx_docs']:
|
|||
|
||||
# Set the title header
|
||||
title = page.title
|
||||
tempenv['title'] = '='*len(title) + '\n' + title + '\n' + '='*len(title)
|
||||
tempenv['title'] = '='*len(title) + '\n' + title + '\n' + '='*len(title)
|
||||
doc = ''
|
||||
|
||||
# The base directory of the MATLAB toolbox relative to the sphinx build directory
|
||||
|
|
@ -263,35 +199,11 @@ if localenv['sphinx_docs']:
|
|||
# every time the source is changed, we don't want to have to commit the
|
||||
# change in the rst file as well as the source - too much code churn. So
|
||||
# we use a template and a SubstFile directive.
|
||||
c = tempenv.SubstFile('#doc/sphinx/matlab/code-docs/%s.rst' % page.name,
|
||||
'#doc/sphinx/matlab/matlab-template.rst.in')
|
||||
c = tempenv.SubstFile('#doc/sphinx/matlab/%s.rst' % page.name,
|
||||
'#doc/sphinx/matlab/matlab-template.rst.in')
|
||||
build(c)
|
||||
localenv.Depends(sphinxdocs, c)
|
||||
|
||||
# Matlab examples: create individual documentation pages with the source
|
||||
# for each example
|
||||
examples = []
|
||||
tutorials = []
|
||||
for f in mglob(env, '#samples/matlab', 'm'):
|
||||
tmpenv = env.Clone()
|
||||
tmpenv['script_name'] = f.name
|
||||
tmpenv['script_path'] = '../../../../samples/matlab/%s' % f.name
|
||||
b = tmpenv.SubstFile('#doc/sphinx/matlab/examples/%s.rst' % f.name[:-2],
|
||||
'#doc/sphinx/matlab/example-script.rst.in')
|
||||
build(b)
|
||||
localenv.Depends(sphinxdocs, b)
|
||||
summary = [':doc:`{0} <examples/{1}>`:'.format(f.name, f.name[:-2]),
|
||||
extract_matlab_summary(f.abspath),
|
||||
'']
|
||||
if f.name.startswith('tut'):
|
||||
tutorials.extend(summary)
|
||||
else:
|
||||
examples.extend(summary)
|
||||
|
||||
localenv['matlab_tutorials'] = '\n'.join(tutorials)
|
||||
localenv['matlab_examples'] = '\n'.join(examples)
|
||||
b = localenv.SubstFile('#doc/sphinx/matlab/examples.rst',
|
||||
'#doc/sphinx/matlab/examples.rst.in')
|
||||
build(b)
|
||||
localenv.Depends(sphinxdocs, b)
|
||||
localenv.AlwaysBuild(sphinxdocs)
|
||||
install(localenv.RecursiveInstall, '$inst_docdir/sphinx/html',
|
||||
'#/build/docs/sphinx/html')
|
||||
|
|
|
|||
BIN
doc/ctdeploy_key.enc
Normal file
BIN
doc/ctdeploy_key.enc
Normal file
Binary file not shown.
|
|
@ -15,7 +15,7 @@
|
|||
#---------------------------------------------------------------------------
|
||||
|
||||
USE_MATHJAX = YES
|
||||
MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all
|
||||
|
|
@ -34,13 +34,7 @@ PROJECT_NAME = Cantera
|
|||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.3.0
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
PROJECT_NUMBER = 2.5.0a3
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
|
|
@ -56,7 +50,7 @@ OUTPUT_DIRECTORY = build/docs/doxygen
|
|||
# source files, where putting all generated files in the same directory would
|
||||
# otherwise cause performance problems for the file system.
|
||||
|
||||
CREATE_SUBDIRS = NO
|
||||
CREATE_SUBDIRS = YES
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
|
|
@ -624,7 +618,7 @@ EXCLUDE_SYMLINKS = NO
|
|||
# against the file with absolute path, so to exclude all test directories
|
||||
# for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = */build/*
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
|
|
@ -640,8 +634,7 @@ EXCLUDE_SYMBOLS = std::*
|
|||
|
||||
EXAMPLE_PATH = samples \
|
||||
data/inputs \
|
||||
doc/doxygen \
|
||||
doc/sphinx/cxx-guide
|
||||
doc/doxygen
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
|
|
@ -1170,7 +1163,7 @@ MAN_LINKS = NO
|
|||
# generate an XML file that captures the structure of
|
||||
# the code including all documentation.
|
||||
|
||||
GENERATE_XML = NO
|
||||
GENERATE_XML = YES
|
||||
|
||||
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
|
|
|
|||
|
|
@ -89,13 +89,9 @@
|
|||
* class listed above. These classes assume that there exists a standard state
|
||||
* for each species in the phase, where the Thermodynamic functions are specified
|
||||
* as a function of temperature and pressure. Standard state objects for each
|
||||
* species are all derived from the PDSS virtual base class. Calculators for these
|
||||
* standard state, which coordinate the calculation for all of the species
|
||||
* in a phase, are all derived from the virtual base class VPSSMgr.
|
||||
* In turn, these standard states may employ reference state calculation to
|
||||
* aid in their calculations. And the VPSSMgr calculators may also employ
|
||||
* SimpleThermo calculators to help in calculating the properties for all of the
|
||||
* species in a phase. However, there are some PDSS objects which do not employ
|
||||
* species are all derived from the PDSS virtual base class. In turn, these
|
||||
* standard states may employ reference state calculation to aid in their
|
||||
* calculations. However, there are some PDSS objects which do not employ
|
||||
* reference state calculations. An example of this is real equation of state for
|
||||
* liquid water used within the calculation of brine thermodynamics.
|
||||
* In general, the independent variables that completely describe the state of the
|
||||
|
|
@ -497,15 +493,6 @@
|
|||
* pick a manager, i.e., a derivative of the SpeciesThermo
|
||||
* object, to use.
|
||||
*
|
||||
* If a temperature and pressure dependent standard state is needed
|
||||
* then a call to VPSSMgrFactory::newVPSSMgr()
|
||||
* is made in order
|
||||
* pick a manager, i.e., a derivative of the VPSSMgr
|
||||
* object, to use. Along with the VPSSMgr designation comes a
|
||||
* determination of whether there is an accompanying SpeciesThermo
|
||||
* and what type of SpeciesThermo object to use in the
|
||||
* VPSSMgr calculations.
|
||||
*
|
||||
* Once these determinations are made, the %ThermoPhase object is
|
||||
* ready to start reading in the species information, which includes
|
||||
* all of the available standard state information about the
|
||||
|
|
@ -524,16 +511,9 @@
|
|||
* call to read the XML data from the input file and install the
|
||||
* correct SpeciesThermoInterpType object into the SpeciesThermo object.
|
||||
*
|
||||
* Within installSpecies(), for standard states, the routine,
|
||||
* SpeciesThermoFactory::installVPThermoForSpecies() is
|
||||
* called. However, this is just a shell routine for calling
|
||||
* the VPSSMgr's derived VPSSMgr::createInstallPDSS() routine.
|
||||
* Within the VPSSMgr::createInstallPDSS() routine of the derived VPSSMgr's
|
||||
* object, the XML data from the input file is read and the
|
||||
* calculations for the species standard state is installed.
|
||||
* Additionally, the derived PDSS object is created and installed
|
||||
* into the VPStandardStateTP list containing all of the PDSS objects
|
||||
* for that phase.
|
||||
* Within installSpecies(), for standard states, derived PDSS object is created
|
||||
* and installed into the VPStandardStateTP list containing all of the PDSS
|
||||
* objects for that phase.
|
||||
*
|
||||
* Now that all of the species standard states are read in and
|
||||
* installed into the ThermoPhase object, control once again
|
||||
|
|
@ -574,9 +554,6 @@
|
|||
* In general, factory routines throw specific errors when encountering
|
||||
* unknown thermodynamics models in XML files. All of the error classes
|
||||
* derive from the class, CanteraError.
|
||||
* The newVPSSMgr() routines throws the UnknownVPSSMgr class error when
|
||||
* they encounter an unknown string in the XML input file specifying the
|
||||
* VPSSMgr class to use.
|
||||
*
|
||||
* Many of the important member functions in factory routines are
|
||||
* virtual classes. This means that a user may write their own
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
doc/sphinx/_static/images/SponsoredProject.png
Normal file
BIN
doc/sphinx/_static/images/SponsoredProject.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
doc/sphinx/_static/powered_by_NumFOCUS.png
Normal file
BIN
doc/sphinx/_static/powered_by_NumFOCUS.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -1,10 +1,162 @@
|
|||
{% extends "!layout.html" %}
|
||||
|
||||
|
||||
{% block relbar1 %}
|
||||
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
|
||||
<a href="{{ pathto('index') }}">
|
||||
<img src="{{pathto("_static/cantera-logo.png", 1) }}" border="0" alt="Cantera"/></a>
|
||||
</div>
|
||||
{{ super() }}
|
||||
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) %}
|
||||
{% block doctype %}
|
||||
<!DOCTYPE html>
|
||||
{% endblock %}
|
||||
<html prefix="
|
||||
og: http://ogp.me/ns# article: http://ogp.me/ns/article#
|
||||
"
|
||||
lang="en">
|
||||
|
||||
{%- macro script() %}
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
||||
{%- for scriptfile in script_files %}
|
||||
{%- if scriptfile.startswith("https://cdn.jsdelivr.net") %}
|
||||
<script defer type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||
{%- else %}
|
||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
{%- macro css() %}
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" media="none" onload="this.media='all'" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
{%- for css in css_files %}
|
||||
{%- if css|attr("rel") %}
|
||||
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" media="none" onload="this.media='all'" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
|
||||
{%- else %}
|
||||
<link rel="stylesheet" href="{{ pathto(css, 1) }}" media="none" onload="this.media='all'" type="text/css" />
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro sidebar() %}
|
||||
{%- if render_sidebar %}
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
{%- for sidebartemplate in sidebars %}
|
||||
{%- include sidebartemplate %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ title|e }} | Cantera </title>
|
||||
|
||||
{%- block csss %}
|
||||
{{- css() }}
|
||||
{%- endblock %}
|
||||
{%- if not embedded %}
|
||||
{%- block scripts %}
|
||||
{{- script() }}
|
||||
{%- endblock %}
|
||||
{%- if use_opensearch %}
|
||||
<link rel="search" type="application/opensearchdescription+xml"
|
||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||
{%- endif %}
|
||||
<link rel="shortcut icon" href="/assets/img/favicon.ico" sizes="16x16"/>
|
||||
{%- endif %}
|
||||
{% if theme_canonical_url %}
|
||||
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
|
||||
{% endif %}
|
||||
{%- if hasdoc('search') %}
|
||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
||||
{%- endif %}
|
||||
{%- block extrahead %} {% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
|
||||
|
||||
<!-- Menubar -->
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-light static-top mb-4">
|
||||
<div class="container"><!-- This keeps the margins nice -->
|
||||
<a class="navbar-brand" href="/index.html">
|
||||
<img src="/assets/img/cantera-logo.png" alt="Cantera" id="logo" class="d-inline-block align-top">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-navbar">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a href="/install/index.html" class="nav-link">Install</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/tutorials/index.html" class="nav-link">Tutorials</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/examples/index.html" class="nav-link">Examples</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/community.html" class="nav-link">Community</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/science/index.html" class="nav-link">Science</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/documentation/index.html" class="nav-link">Documentation</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/blog/index.html" class="nav-link">Blog</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container -->
|
||||
</nav>
|
||||
<!-- End of Menubar -->
|
||||
|
||||
<div class="container" id="content">
|
||||
<div class="body-content">
|
||||
<!--Body content-->
|
||||
{% block content %}
|
||||
<div class="document">
|
||||
{% block document %}
|
||||
<div class="documentwrapper">
|
||||
{%- if render_sidebar %}
|
||||
<div class="bodywrapper">
|
||||
{%- endif %}
|
||||
<div class="body" role="main">
|
||||
{% block body %} {% endblock %}
|
||||
</div>
|
||||
{%- if render_sidebar %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% endblock %} <!-- end of block document -->
|
||||
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
{% endblock %} <!--End of block content-->
|
||||
|
||||
<div class="footer">
|
||||
{% if show_copyright %}©{{ copyright }}.{% endif %}
|
||||
{% if theme_show_powered_by|lower == 'true' %}
|
||||
{% if show_copyright %}|{% endif %}
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a>
|
||||
{% endif %}
|
||||
{%- if show_source and has_source and sourcename %}
|
||||
{% if show_copyright or theme_show_powered_by %}|{% endif %}
|
||||
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
|
||||
rel="nofollow">{{ _('Page source') }}</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha256-98vAGjEDGN79TjHkYWVD4s87rvWkdWLHPs5MC3FvFX4=" crossorigin="anonymous"></script>
|
||||
<script async="async" src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
5
doc/sphinx/_templates/numfocus.html
Normal file
5
doc/sphinx/_templates/numfocus.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<div id="numfocus">
|
||||
<h3>Donate to Cantera</h3>
|
||||
<a href="https://numfocus.salsalabs.org/donate-to-cantera/index.html">
|
||||
<img src="{{pathto("_static/powered_by_NumFOCUS.png", 1) }}" border="0" alt="NumFOCUS"/></a>
|
||||
</div>
|
||||
|
|
@ -1,523 +0,0 @@
|
|||
|
||||
.. _scons-config:
|
||||
|
||||
*********************
|
||||
Configuration Options
|
||||
*********************
|
||||
|
||||
This document lists the options available for compiling Cantera with SCons. The
|
||||
default values are operating-system dependent. To see the defaults for your
|
||||
current operating system, run the command::
|
||||
|
||||
scons help
|
||||
|
||||
from the command prompt.
|
||||
|
||||
The following options can be passed to SCons to customize the Cantera
|
||||
build process. They should be given in the form::
|
||||
|
||||
scons build option1=value1 option2=value2
|
||||
|
||||
Variables set in this way will be stored in the ``cantera.conf`` file and reused
|
||||
automatically on subsequent invocations of SCons. Alternatively, the
|
||||
configuration options can be entered directly into ``cantera.conf`` before
|
||||
running ``scons build``. The format of this file is::
|
||||
|
||||
option1 = 'value1'
|
||||
option2 = 'value2'
|
||||
|
||||
Options List
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. _msvc-version:
|
||||
|
||||
* ``msvc_version``: [ ``string`` ]
|
||||
Version of Visual Studio to use. The default is the newest
|
||||
installed version. Specify ``12.0`` for Visual Studio 2013 or ``14.0``
|
||||
for Visual Studio 2015. Windows MSVC only.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _target-arch:
|
||||
|
||||
* ``target_arch``: [ ``string`` ]
|
||||
Target architecture. The default is the same architecture as the
|
||||
installed version of Python. Windows only.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _toolchain:
|
||||
|
||||
* ``toolchain``: [ ``msvc`` | ``mingw`` | ``intel`` ]
|
||||
The preferred compiler toolchain. Windows only.
|
||||
|
||||
- default: ``'msvc'``
|
||||
|
||||
.. _CXX:
|
||||
|
||||
* ``CXX``: [ ``string`` ]
|
||||
The C++ compiler to use.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _CC:
|
||||
|
||||
* ``CC``: [ ``string`` ]
|
||||
The C compiler to use. This is only used to compile CVODE.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _prefix:
|
||||
|
||||
* ``prefix``: [ ``/path/to/prefix`` ]
|
||||
Set this to the directory where Cantera should be installed.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _python-package:
|
||||
|
||||
* ``python_package``: [ ``new`` | ``full`` | ``minimal`` | ``none`` | ``default`` ]
|
||||
If you plan to work in Python 2, then you need the ``full`` Cantera Python
|
||||
package. If, on the other hand, you will only use Cantera from some
|
||||
other language (e.g. MATLAB or Fortran 90/95) and only need Python
|
||||
to process CTI files, then you only need a ``minimal`` subset of the
|
||||
package and Cython and NumPy are not necessary. The ``none`` option
|
||||
doesn't install any components of the Python interface. The default
|
||||
behavior is to build the full Python 2 module if the required
|
||||
prerequisites (NumPy and Cython) are installed.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _python-cmd:
|
||||
|
||||
* ``python_cmd``: [ ``/path/to/python_cmd`` ]
|
||||
Cantera needs to know where to find the Python interpreter. If the
|
||||
``python_cmd`` option is not set, then the configuration
|
||||
process will use the same Python interpreter being used by SCons.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _python-array-home:
|
||||
|
||||
* ``python_array_home``: [ ``/path/to/python_array_home`` ]
|
||||
If NumPy was installed using the ``--home`` option, set this to the home
|
||||
directory for NumPy for Python 2.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _python-prefix:
|
||||
|
||||
* ``python_prefix``: [ ``/path/to/python_prefix`` ]
|
||||
Use this option if you want to install the Cantera Python 2 package to
|
||||
an alternate location. On Unix-like systems, the default is the same
|
||||
as the ``prefix`` option. If the ``python_prefix`` option is set to
|
||||
the empty string or the ``prefix`` option is not set, then the package
|
||||
will be installed to the system default ``site-packages`` directory.
|
||||
To install to the current user's ``site-packages`` directory, use
|
||||
``python_prefix=USER``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _python3-package:
|
||||
|
||||
* ``python3_package``: [ ``y`` | ``n`` | ``default`` ]
|
||||
Controls whether or not the Python 3 module will be built. By
|
||||
default, the module will be built if the Python 3 interpreter
|
||||
and the required dependencies (NumPy for Python 3 and Cython
|
||||
for the version of Python for which SCons is installed) can be
|
||||
found.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _python3-cmd:
|
||||
|
||||
* ``python3_cmd``: [ ``/path/to/python3_cmd`` ]
|
||||
The path to the Python 3 interpreter. The default is
|
||||
``python3``; if this executable cannot be found, this
|
||||
value must be specified to build the Python 3 module.
|
||||
|
||||
- default: ``'python3'``
|
||||
|
||||
.. _python3-array-home:
|
||||
|
||||
* ``python3_array_home``: [ ``/path/to/python3_array_home`` ]
|
||||
If NumPy was installed using the ``--home`` option, set this to the home
|
||||
directory for NumPy for Python 3.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _python3-prefix:
|
||||
|
||||
* ``python3_prefix``: [ ``/path/to/python3_prefix`` ]
|
||||
Use this option if you want to install the Cantera Python 3 package to
|
||||
an alternate location. On Unix-like systems, the default is the same
|
||||
as the ``prefix`` option. If the ``python_prefix`` option is set to
|
||||
the empty string or the ``prefix`` option is not set, then the package
|
||||
will be installed to the system default ``site-packages`` directory.
|
||||
To install to the current user's ``site-packages`` directory, use
|
||||
``python_prefix=USER``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _matlab-toolbox:
|
||||
|
||||
* ``matlab_toolbox``: [ ``y`` | ``n`` | ``default`` ]
|
||||
This variable controls whether the MATLAB toolbox will be built. If
|
||||
set to ``y``, you will also need to set the value of the ``matlab_path``
|
||||
variable. If ``matlab_toolbox`` is set to ``default``, the MATLAB toolbox
|
||||
will be built if ``matlab_path`` is set.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _matlab-path:
|
||||
|
||||
* ``matlab_path``: [ ``/path/to/matlab_path`` ]
|
||||
Path to the MATLAB install directory. This should be the directory
|
||||
containing the ``extern``, ``bin``, etc. subdirectories. Typical values
|
||||
are: ``C:/Program Files/MATLAB/R2011a`` on Windows,
|
||||
``/Applications/MATLAB_R2011a.app`` on OS X, or ``/opt/MATLAB/R2011a``
|
||||
on Linux.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _f90-interface:
|
||||
|
||||
* ``f90_interface``: [ ``y`` | ``n`` | ``default`` ]
|
||||
This variable controls whether the Fortran 90/95 interface will be
|
||||
built. If set to ``default``, the builder will look for a compatible
|
||||
Fortran compiler in the ``PATH`` environment variable, and compile
|
||||
the Fortran 90 interface if one is found.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _FORTRAN:
|
||||
|
||||
* ``FORTRAN``: [ ``/path/to/FORTRAN`` ]
|
||||
The Fortran (90) compiler. If unspecified, the builder will look for
|
||||
a compatible compiler (gfortran, ifort, g95) in the ``PATH`` environment
|
||||
variable. Used only for compiling the Fortran 90 interface.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _FORTRANFLAGS:
|
||||
|
||||
* ``FORTRANFLAGS``: [ ``string`` ]
|
||||
Compilation options for the Fortran (90) compiler.
|
||||
|
||||
- default: ``'-O3'``
|
||||
|
||||
.. _coverage:
|
||||
|
||||
* ``coverage``: [ ``yes`` | ``no`` ]
|
||||
Enable collection of code coverage information with gcov. Available
|
||||
only when compiling with gcc.
|
||||
|
||||
- default: ``'no'``
|
||||
|
||||
.. _doxygen-docs:
|
||||
|
||||
* ``doxygen_docs``: [ ``yes`` | ``no`` ]
|
||||
Build HTML documentation for the C++ interface using Doxygen.
|
||||
|
||||
- default: ``'no'``
|
||||
|
||||
.. _sphinx-docs:
|
||||
|
||||
* ``sphinx_docs``: [ ``yes`` | ``no`` ]
|
||||
Build HTML documentation for Cantera using Sphinx.
|
||||
|
||||
- default: ``'no'``
|
||||
|
||||
.. _sphinx-cmd:
|
||||
|
||||
* ``sphinx_cmd``: [ ``/path/to/sphinx_cmd`` ]
|
||||
Command to use for building the Sphinx documentation.
|
||||
|
||||
- default: ``'sphinx-build'``
|
||||
|
||||
.. _system-eigen:
|
||||
|
||||
* ``system_eigen``: [ ``default`` | ``y`` | ``n`` ]
|
||||
Select whether to use Eigen from a system installation (``y``), from a
|
||||
Git submodule (``n``), or to decide automatically (``default``). If
|
||||
Eigen is not installed directly into a system include directory,
|
||||
e.g. it is installed in ``/opt/include/eigen3/Eigen``, then you will
|
||||
need to add ``/opt/include/eigen3`` to the ``extra_inc_dirs`` option.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _system-fmt:
|
||||
|
||||
* ``system_fmt``: [ ``default`` | ``y`` | ``n`` ]
|
||||
Select whether to use the fmt library from a system installation
|
||||
(``y``), from a Git submodule (``n``), or to decide automatically
|
||||
(``default``).
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _system-sundials:
|
||||
|
||||
* ``system_sundials``: [ ``default`` | ``y`` | ``n`` ]
|
||||
Select whether to use SUNDIALS from a system installation (``y``),
|
||||
from a Git submodule (``n``), or to decide automatically (``default``).
|
||||
Specifying ``sundials_include`` or ``sundials_libdir`` changes the
|
||||
default to ``y``.
|
||||
|
||||
- default: ``'default'``
|
||||
|
||||
.. _sundials-include:
|
||||
|
||||
* ``sundials_include``: [ ``/path/to/sundials_include`` ]
|
||||
The directory where the SUNDIALS header files are installed. This
|
||||
should be the directory that contains the ``cvodes``, ``nvector``, etc.
|
||||
subdirectories. Not needed if the headers are installed in a
|
||||
standard location, e.g., ``/usr/include``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _sundials-libdir:
|
||||
|
||||
* ``sundials_libdir``: [ ``/path/to/sundials_libdir`` ]
|
||||
The directory where the SUNDIALS static libraries are installed. Not
|
||||
needed if the libraries are installed in a standard location, e.g.,
|
||||
``/usr/lib``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _blas-lapack-libs:
|
||||
|
||||
* ``blas_lapack_libs``: [ ``string`` ]
|
||||
Cantera can use BLAS and LAPACK libraries available on your system
|
||||
if you have optimized versions available (e.g., Intel MKL).
|
||||
Otherwise, Cantera will use Eigen for linear algebra support. To use
|
||||
BLAS and LAPACK, set ``blas_lapack_libs`` to the the list of libraries
|
||||
that should be passed to the linker, separated by commas, e.g.,
|
||||
``"lapack,blas"`` or ``"lapack,f77blas,cblas,atlas"``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _blas-lapack-dir:
|
||||
|
||||
* ``blas_lapack_dir``: [ ``/path/to/blas_lapack_dir`` ]
|
||||
Directory containing the libraries specified by ``blas_lapack_libs``. Not
|
||||
needed if the libraries are installed in a standard location, e.g.
|
||||
``/usr/lib``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _lapack-names:
|
||||
|
||||
* ``lapack_names``: [ ``lower`` | ``upper`` ]
|
||||
Set depending on whether the procedure names in the specified
|
||||
libraries are lowercase or uppercase. If you don't know, run ``nm`` on
|
||||
the library file (e.g., ``nm libblas.a``).
|
||||
|
||||
- default: ``'lower'``
|
||||
|
||||
.. _lapack-ftn-trailing-underscore:
|
||||
|
||||
* ``lapack_ftn_trailing_underscore``: [ ``yes`` | ``no`` ]
|
||||
Controls whether the LAPACK functions have a trailing underscore
|
||||
in the Fortran libraries.
|
||||
|
||||
- default: ``'yes'``
|
||||
|
||||
.. _lapack-ftn-string-len-at-end:
|
||||
|
||||
* ``lapack_ftn_string_len_at_end``: [ ``yes`` | ``no`` ]
|
||||
Controls whether the LAPACK functions have the string length
|
||||
argument at the end of the argument list (``yes``) or after
|
||||
each argument (``no``) in the Fortran libraries.
|
||||
- default: 'yes'
|
||||
|
||||
.. _system-googletest:
|
||||
|
||||
* ``system_googletest``: [ ``default`` | ``y`` | ``n`` ]
|
||||
Select whether to use gtest from system installation (``y``), from a
|
||||
Git submodule (``n``), or to decide automatically (``default``).
|
||||
- default: 'default'
|
||||
|
||||
.. _env-vars:
|
||||
|
||||
* ``env_vars``: [ ``string`` ]
|
||||
Environment variables to propagate through to SCons. Either the
|
||||
string ``all`` or a comma separated list of variable names, e.g.
|
||||
``LD_LIBRARY_PATH,HOME``.
|
||||
|
||||
- default: ``'LD_LIBRARY_PATH,PYTHONPATH'``
|
||||
|
||||
.. _use-pch:
|
||||
|
||||
* ``use_pch``: [ ``yes`` | ``no`` ]
|
||||
Use a precompiled-header to speed up compilation
|
||||
|
||||
- default: ``'yes'``
|
||||
|
||||
.. _cxx-flags:
|
||||
|
||||
* ``cxx_flags``: [ ``string`` ]
|
||||
Compiler flags passed to the C++ compiler only. Separate multiple
|
||||
options with spaces, e.g., ``cxx_flags='-g -Wextra -O3 --std=c++11'``
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _cc-flags:
|
||||
|
||||
* ``cc_flags``: [ ``string`` ]
|
||||
Compiler flags passed to both the C and C++ compilers, regardless of
|
||||
optimization level
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _thread-flags:
|
||||
|
||||
* ``thread_flags``: [ ``string`` ]
|
||||
Compiler and linker flags for POSIX multithreading support.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _optimize:
|
||||
|
||||
* ``optimize``: [ ``yes`` | ``no`` ]
|
||||
Enable extra compiler optimizations specified by the
|
||||
``optimize_flags`` variable, instead of the flags specified by the
|
||||
``no_optimize_flags`` variable.
|
||||
|
||||
- default: ``'yes'``
|
||||
|
||||
.. _optimize-flags:
|
||||
|
||||
* ``optimize_flags``: [ ``string`` ]
|
||||
Additional compiler flags passed to the C/C++ compiler when
|
||||
``optimize=yes``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _no-optimize-flags:
|
||||
|
||||
* ``no_optimize_flags``: [ ``string`` ]
|
||||
Additional compiler flags passed to the C/C++ compiler when
|
||||
``optimize=no``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _debug:
|
||||
|
||||
* ``debug``: [ ``yes`` | ``no`` ]
|
||||
Enable compiler debugging symbols.
|
||||
|
||||
- default: ``'yes'``
|
||||
|
||||
.. _debug-flags:
|
||||
|
||||
* ``debug_flags``: [ ``string`` ]
|
||||
Additional compiler flags passed to the C/C++ compiler when
|
||||
``debug=yes``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _no-debug-flags:
|
||||
|
||||
* ``no_debug_flags``: [ ``string`` ]
|
||||
Additional compiler flags passed to the C/C++ compiler when
|
||||
``debug=no``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _debug-linker-flags:
|
||||
|
||||
* ``debug_linker_flags``: [ ``string`` ]
|
||||
Additional options passed to the linker when ``debug=yes``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _no-debug-linker-flags:
|
||||
|
||||
* ``no_debug_linker_flags``: [ ``string`` ]
|
||||
Additional options passed to the linker when ``debug=no``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _warning-flags:
|
||||
|
||||
* ``warning_flags``: [ ``string`` ]
|
||||
Additional compiler flags passed to the C/C++ compiler to enable
|
||||
extra warnings. Used only when compiling source code that is part of
|
||||
Cantera (e.g. excluding code in the 'ext' directory).
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _extra-inc-dirs:
|
||||
|
||||
* ``extra_inc_dirs``: [ ``string`` ]
|
||||
Additional directories to search for header files (colon-separated
|
||||
list).
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _extra-lib-dirs:
|
||||
|
||||
* ``extra_lib_dirs``: [ ``string`` ]
|
||||
Additional directories to search for libraries (colon-separated
|
||||
list).
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _boost-inc-dir:
|
||||
|
||||
* ``boost_inc_dir``: [ ``/path/to/boost_inc_dir`` ]
|
||||
Location of the Boost header files. Not needed if the headers are
|
||||
installed in a standard location, e.g. ``/usr/include``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _stage-dir:
|
||||
|
||||
* ``stage_dir``: [ ``/path/to/stage_dir`` ]
|
||||
Directory relative to the Cantera source directory to be used as a
|
||||
staging area for building e.g., a Debian package. If specified,
|
||||
``scons install`` will install files to ``stage_dir/prefix/...``.
|
||||
|
||||
- default: ``''``
|
||||
|
||||
.. _VERBOSE:
|
||||
|
||||
* ``VERBOSE``: [ ``yes`` | ``no`` ]
|
||||
Create verbose output about what SCons is doing.
|
||||
|
||||
- default: ``'no'``
|
||||
|
||||
.. _renamed-shared-libraries:
|
||||
|
||||
* ``renamed_shared_libraries``: [ ``yes`` | ``no`` ]
|
||||
If this option is turned on, the shared libraries that are created
|
||||
will be renamed to have a ``_shared`` extension added to their base
|
||||
name. If not, the base names will be the same as the static
|
||||
libraries. In some cases this simplifies subsequent linking
|
||||
environments with static libraries and avoids a bug with using
|
||||
valgrind with the ``-static`` linking flag.
|
||||
|
||||
- default: ``'yes'``
|
||||
|
||||
.. _versioned-shared-library:
|
||||
|
||||
* ``versioned_shared_library``: [ ``yes`` | ``no`` ]
|
||||
If enabled, create a versioned shared library, with symlinks to the
|
||||
more generic library name, e.g. ``libcantera_shared.so.2.3.0`` as the
|
||||
actual library and ``libcantera_shared.so`` and ``libcantera_shared.so.2``
|
||||
as symlinks.
|
||||
|
||||
- default: ``'no'``
|
||||
|
||||
.. _layout:
|
||||
|
||||
* ``layout``: [ ``standard`` | ``compact`` | ``debian`` ]
|
||||
The layout of the directory structure. 'standard' installs files to
|
||||
several subdirectories under 'prefix', e.g. $prefix/bin,
|
||||
$prefix/include/cantera, $prefix/lib. This layout is best used in
|
||||
conjunction with 'prefix'='/usr/local'. 'compact' puts all installed
|
||||
files in the subdirectory defined by 'prefix'. This layout is best
|
||||
with a prefix like '/opt/cantera'. 'debian' installs to the
|
||||
stage directory in a layout used for generating Debian packages.
|
||||
|
||||
- default: ``'standard'``
|
||||
|
|
@ -1,252 +0,0 @@
|
|||
|
||||
.. _sec-determine-config:
|
||||
|
||||
Determine configuration options
|
||||
===============================
|
||||
|
||||
* Run ``scons help`` to see a list all configuration options for Cantera, or
|
||||
see :ref:`scons-config`.
|
||||
|
||||
* Configuration options are specified as additional arguments to the ``scons``
|
||||
command, e.g.::
|
||||
|
||||
scons command option=value
|
||||
|
||||
where ``scons`` is the program that manages the build steps, and ``command``
|
||||
is most commonly one of
|
||||
|
||||
* ``build``
|
||||
* ``test``
|
||||
* ``clean``
|
||||
|
||||
Other commands are possible, and are explained in :ref:`sec-build-commands`.
|
||||
|
||||
* SCons saves configuration options specified on the command line in the file
|
||||
``cantera.conf`` in the root directory of the source tree, so generally it is
|
||||
not necessary to respecify configuration options when rebuilding Cantera. To
|
||||
unset a previously set configuration option, either remove the corresponding
|
||||
line from ``cantera.conf`` or use the syntax::
|
||||
|
||||
scons command option_name=
|
||||
|
||||
* Sometimes, changes in your environment can cause SCons's configuration tests
|
||||
(e.g., checking for libraries or compiler capabilities) to unexpectedly fail.
|
||||
To force SCons to re-run these tests rather than trusting the cached results,
|
||||
run scons with the option ``--config=force``.
|
||||
|
||||
* The following lists of options are not complete, they show only some commonly
|
||||
used options. The entire list of options can be found in :ref:`scons-config`.
|
||||
|
||||
Common Options
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
* :ref:`blas_lapack_libs <blas-lapack-libs>`
|
||||
|
||||
* On OS X, the Accelerate framework is automatically used to provide
|
||||
optimized versions of BLAS and LAPACK, so the ``blas_lapack_libs``
|
||||
option should generally be left unspecified.
|
||||
|
||||
* :ref:`blas_lapack_dir <blas-lapack-dir>`
|
||||
* :ref:`boost_inc_dir <boost-inc-dir>`
|
||||
* :ref:`debug <debug>`
|
||||
* :ref:`optimize <optimize>`
|
||||
* :ref:`prefix <prefix>`
|
||||
* :ref:`sundials_include <sundials-include>`
|
||||
* :ref:`sundials_libdir <sundials-libdir>`
|
||||
|
||||
Python 2 Module Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
By default, SCons will attempt to build the Cython-based Python module for
|
||||
Python 2, if both Numpy and Cython are installed. The following options control
|
||||
how the Python 2 module is built:
|
||||
|
||||
* :ref:`python_cmd <python-cmd>`
|
||||
* :ref:`python_package <python-package>`
|
||||
* :ref:`python_prefix <python-prefix>`
|
||||
|
||||
Python 3 Module Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If SCons detects a Python 3 interpreter installed in a default location
|
||||
(i.e., ``python3`` is on the ``PATH`` environment variable) or
|
||||
``python3_package`` is ``y``, SCons will try to build the Python module
|
||||
for Python 3. The following SCons options control how the Python 3 module is
|
||||
built:
|
||||
|
||||
* :ref:`python3_cmd <python3-cmd>`
|
||||
* :ref:`python3_package <python3-package>`
|
||||
* :ref:`python3_prefix <python3-prefix>`
|
||||
|
||||
Note that even when building the Python 3 Cantera module, you should still use
|
||||
Python 2 with SCons, as SCons does not currently support Python 3.
|
||||
|
||||
Windows Only Options
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note::
|
||||
|
||||
The ``cantera.conf`` file uses the backslash character ``\`` as an escape
|
||||
character. When modifying this file, backslashes in paths need to be escaped
|
||||
like this: ``boost_inc_dir = 'C:\\Program Files (x86)\\boost\\include'``
|
||||
This does not apply to paths specified on the command line. Alternatively,
|
||||
you can use forward slashes (``/``) in paths.
|
||||
|
||||
* In Windows there aren't any proper default locations for many of the packages
|
||||
that Cantera depends on, so you will need to specify these paths explicitly.
|
||||
|
||||
* Remember to put double quotes around any paths with spaces in them, e.g.
|
||||
``"C:\Program Files"``.
|
||||
|
||||
* By default, SCons attempts to use the same architecture as the copy of Python
|
||||
that is running SCons, and the most recent installed version of the Visual
|
||||
Studio compiler. If you aren't building the Python module, you can override
|
||||
this with the configuration options ``target_arch`` and ``msvc_version``.
|
||||
|
||||
* To compile with MinGW, specify the :ref:`toolchain <toolchain>` option::
|
||||
|
||||
toolchain=mingw
|
||||
|
||||
* :ref:`msvc_version <msvc-version>`
|
||||
* :ref:`target_arch <target-arch>`
|
||||
* :ref:`toolchain <toolchain>`
|
||||
|
||||
MATLAB Toolbox Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Building the MATLAB toolbox requires an installed copy of MATLAB, and the path
|
||||
to the directory where MATLAB is installed must be specified using the following
|
||||
option:
|
||||
|
||||
* :ref:`matlab_path <matlab-path>`
|
||||
|
||||
Fortran Module Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Building the Fortran module requires a compatible Fortran comiler. SCons will
|
||||
attempt to find a compatible compiler by default in the ``PATH`` environment
|
||||
variable. The following options control how the Fortran module is built:
|
||||
|
||||
* :ref:`f90_interface <f90-interface>`
|
||||
* :ref:`FORTRAN <FORTRAN>`
|
||||
|
||||
Documentation Options
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following options control if the documentation is built:
|
||||
|
||||
* :ref:`doxygen_docs <doxygen-docs>`
|
||||
* :ref:`sphinx_docs <sphinx-docs>`
|
||||
|
||||
Less Common Options
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* :ref:`CC <CC>`
|
||||
* :ref:`CXX <CXX>`
|
||||
* :ref:`env_vars <env-vars>`
|
||||
* :ref:`layout <layout>`
|
||||
* :ref:`VERBOSE <VERBOSE>`
|
||||
|
||||
.. _sec-build-commands:
|
||||
|
||||
Build Commands
|
||||
==============
|
||||
|
||||
The following options are possible as commands to SCons, i.e., the first
|
||||
argument after ``scons``::
|
||||
|
||||
scons command
|
||||
|
||||
* ``scons help``
|
||||
Print a description of user-specifiable options.
|
||||
|
||||
* ``scons build``
|
||||
Compile Cantera and the language interfaces using
|
||||
default options.
|
||||
|
||||
* ``scons clean``
|
||||
Delete files created while building Cantera.
|
||||
|
||||
* ``[sudo] scons install``
|
||||
Install Cantera.
|
||||
|
||||
* ``[sudo] scons uninstall``
|
||||
Uninstall Cantera.
|
||||
|
||||
* ``scons test``
|
||||
Run all tests which did not previously pass or for which the
|
||||
results may have changed.
|
||||
|
||||
* ``scons test-reset``
|
||||
Reset the passing status of all tests.
|
||||
|
||||
* ``scons test-clean``
|
||||
Delete files created while running the tests.
|
||||
|
||||
* ``scons test-help``
|
||||
List available tests.
|
||||
|
||||
* ``scons test-NAME``
|
||||
Run the test named "NAME".
|
||||
|
||||
* ``scons <command> dump``
|
||||
Dump the state of the SCons environment to the
|
||||
screen instead of doing ``<command>``, e.g.
|
||||
``scons build dump``. For debugging purposes.
|
||||
|
||||
* ``scons samples``
|
||||
Compile the C++ and Fortran samples.
|
||||
|
||||
* ``scons msi``
|
||||
Build a Windows installer (.msi) for Cantera.
|
||||
|
||||
* ``scons sphinx``
|
||||
Build the Sphinx documentation
|
||||
|
||||
* ``scons doxygen``
|
||||
Build the Doxygen documentation
|
||||
|
||||
Compile Cantera & Test
|
||||
======================
|
||||
|
||||
* Run SCons with the list of desired configuration options::
|
||||
|
||||
scons build ...
|
||||
|
||||
* If Cantera compiles successfully, you should see a message that looks like::
|
||||
|
||||
*******************************************************
|
||||
Compilation completed successfully.
|
||||
|
||||
- To run the test suite, type 'scons test'.
|
||||
- To install, type '[sudo] scons install'.
|
||||
*******************************************************
|
||||
|
||||
* If you do not see this message, check the output for errors to see what went
|
||||
wrong.
|
||||
|
||||
* Cantera has a series of tests that can be run with the command::
|
||||
|
||||
scons test
|
||||
|
||||
* When the tests finish, you should see a summary indicating the number of
|
||||
tests that passed and failed.
|
||||
|
||||
* If you have tests that fail, try looking at the following to determine the
|
||||
source of the error:
|
||||
|
||||
* Messages printed to the console while running ``scons test``
|
||||
* Output files generated by the tests
|
||||
|
||||
Building Documentation
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* To build the Cantera HTML documentation, run the commands::
|
||||
|
||||
scons doxygen
|
||||
scons sphinx
|
||||
|
||||
or append the options ``sphinx_docs=y`` and ``doxygen_docs=y`` to the build
|
||||
command, e.g.::
|
||||
|
||||
scons build doxygen_docs=y sphinx_docs=y
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
|
||||
.. _sec-dependencies:
|
||||
|
||||
Software used by Cantera
|
||||
========================
|
||||
|
||||
This section lists the versions of third-party software that are required to
|
||||
build and use Cantera.
|
||||
|
||||
Compilers
|
||||
---------
|
||||
|
||||
You must have one of the following C++ compilers installed on your system. A
|
||||
Fortran compiler is required only if you plan to build the Fortran module.
|
||||
|
||||
* GNU compilers (C/C++/Fortran)
|
||||
|
||||
* Known to work with version 4.8; Expected to work with version >= 4.6
|
||||
|
||||
* Clang/LLVM (C/C++)
|
||||
|
||||
* Known to work with versions 3.5 and 3.8. Expected to work with version
|
||||
>= 3.1.
|
||||
* Works with the version included with Xcode 8.2.1.
|
||||
|
||||
* Intel compilers (C/C++/Fortran)
|
||||
|
||||
* Known to work with version 14.0.
|
||||
|
||||
* Microsoft compilers (C/C++)
|
||||
|
||||
* Known to work with versions 12.0 (Visual Studio 2013) and 14.0 (Visual
|
||||
Studio 2015).
|
||||
|
||||
* MinGW (C/C++/Fortran)
|
||||
|
||||
* http://mingw-w64.sourceforge.net/ (64-bit and 32-bit)
|
||||
* http://tdm-gcc.tdragon.net/ (64-bit and 32-bit)
|
||||
* Known to work with Mingw-w64 3.0, which provides GCC 4.8. Expected to work
|
||||
with any version that provides a supported version of GCC and includes C++11
|
||||
thread support.
|
||||
|
||||
Other Required Software
|
||||
-----------------------
|
||||
|
||||
* SCons:
|
||||
|
||||
* http://scons.org/tag/releases.html
|
||||
* Linux & OS X: Known to work with SCons 2.4.1; Expected to work with versions >= 1.0.0
|
||||
* Version 2.3.6 or newer is required to use Visual Studio 2015.
|
||||
|
||||
* Python:
|
||||
|
||||
* http://python.org/download/
|
||||
* Known to work with 2.7 and 3.5. Expected to work with versions >= 3.3.
|
||||
* The Cython module supports Python 2.7 and 3.x. However, SCons requires
|
||||
Python 2, so compilation of the Python 3 module requires two Python
|
||||
installations.
|
||||
|
||||
* Boost
|
||||
|
||||
* http://www.boost.org/users/download/
|
||||
* Known to work with version 1.54; Expected to work with versions >= 1.48
|
||||
* Only the "header-only" portions of Boost are required. Cantera does not
|
||||
currently depend on any of the compiled Boost libraries.
|
||||
|
||||
* SUNDIALS
|
||||
|
||||
* If SUNDIALS is not installed, it will be automatically downloaded and the
|
||||
necessary portions will be compiled and installed with Cantera.
|
||||
* https://computation.llnl.gov/casc/sundials/download/download.html
|
||||
* Known to work with versions 2.4, 2.5, 2.6, and 2.7.
|
||||
* To use SUNDIALS with Cantera on a Linux/Unix system, it must be compiled
|
||||
with the ``-fPIC`` flag. You can specify this flag when configuring
|
||||
SUNDIALS (2.4 or 2.5)::
|
||||
|
||||
configure --with-cflags=-fPIC
|
||||
|
||||
or SUNDIALS 2.6 or 2.7::
|
||||
|
||||
cmake -DCMAKE_C_FLAGS=-fPIC <other command-line options>
|
||||
|
||||
.. note:: If you are compiling SUNDIALS 2.5.0 on Windows using CMake, you need
|
||||
to edit the ``CMakeLists.txt`` file first and change the lines::
|
||||
|
||||
SET(PACKAGE_STRING "SUNDIALS 2.4.0")
|
||||
SET(PACKAGE_VERSION "2.4.0")
|
||||
|
||||
to read::
|
||||
|
||||
SET(PACKAGE_STRING "SUNDIALS 2.5.0")
|
||||
SET(PACKAGE_VERSION "2.5.0")
|
||||
|
||||
instead, so that Cantera can correctly identify the version of
|
||||
SUNDIALS.
|
||||
|
||||
* Eigen
|
||||
|
||||
* If Eigen is not installed, it will be automatically downloaded and installed
|
||||
with Cantera.
|
||||
* http://eigen.tuxfamily.org/
|
||||
* Known to work with version 3.2.8.
|
||||
|
||||
* fmt
|
||||
|
||||
* If fmt (previously known as cppformat) is not installed, it will be
|
||||
automatically downloaded and the necessary portions will be compiled and
|
||||
installed with Cantera.
|
||||
* http://fmtlib.net/latest/index.html
|
||||
* Version 3.0.1 or newer is required.
|
||||
|
||||
* Google Test
|
||||
|
||||
* If Google Test is not installed, it will be automatically downloaded and the
|
||||
necessary portions will be compiled as part of the Cantera build process.
|
||||
* https://github.com/google/googletest
|
||||
* Known to work with version 1.7.0.
|
||||
|
||||
Optional Programs
|
||||
-----------------
|
||||
|
||||
* `Numpy <http://www.numpy.org/>`_
|
||||
|
||||
* Required to build the Cantera Python module, and to run significant portions
|
||||
of the test suite.
|
||||
* Known to work with versions 1.7-1.11; Expected to work with version >= 1.4
|
||||
|
||||
* `Cython <http://cython.org/>`_
|
||||
|
||||
* Required version >=0.23 installed for Python 2.7 to build the Python module
|
||||
for both Python 2.7 and Python 3.x.
|
||||
|
||||
* `3to2 <http://pypi.python.org/pypi/3to2>`_
|
||||
|
||||
* Used to convert Python examples to Python 2 syntax.
|
||||
* Known to work with version 1.0
|
||||
|
||||
* Matlab
|
||||
|
||||
* Required to build the Cantera Matlab toolbox.
|
||||
* Known to work with 2009a and 2014b. Expected to work with versions >= 2009a.
|
||||
|
||||
* `Windows Installer XML (WiX) toolset <http://wixtoolset.org/>`_
|
||||
|
||||
* Required to build MSI installers on Windows.
|
||||
* Known to work with versions 3.5 and 3.8.
|
||||
|
||||
* `Pip <https://pip.pypa.io/en/stable/installing>`_ (Python)
|
||||
|
||||
* Provides the ``pip`` command which can be used to install most of
|
||||
the other Python modules.
|
||||
|
||||
* Packages required for building Sphinx documentation
|
||||
|
||||
* `Sphinx <http://sphinx.pocoo.org/>`_ (install with ``pip install --upgrade sphinx``)
|
||||
* `Pygments <http://pygments.org/>`_ (install with ``pip install --upgrade pygments``)
|
||||
* `pyparsing <http://sourceforge.net/projects/pyparsing/>`_ (install with ``pip install --upgrade pyparsing``)
|
||||
* `doxylink <http://pypi.python.org/pypi/sphinxcontrib-doxylink/>`_ (install with ``pip install --upgrade sphinxcontrib-doxylink``)
|
||||
* `matlabdomain <https://pypi.python.org/pypi/sphinxcontrib-matlabdomain>`_ (install with ``pip install sphinxcontrib-matlabdomain``)
|
||||
|
||||
* `Doxygen <http://www.stack.nl/~dimitri/doxygen/>`_
|
||||
|
||||
* Required for building the C++ API Documentation
|
||||
* Version 1.8 or newer is recommended.
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
.. _sec-compiling:
|
||||
|
||||
*************************
|
||||
Cantera Compilation Guide
|
||||
*************************
|
||||
|
||||
This guide contains instructions for compiling Cantera on supported operating
|
||||
systems and provides some detail of the possible configuration options.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
installation-reqs
|
||||
source-code
|
||||
configure-build
|
||||
dependencies
|
||||
special-cases
|
||||
config-options
|
||||
|
|
@ -1,404 +0,0 @@
|
|||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
.. _sec-installation-reqs:
|
||||
|
||||
Installation Prerequisites
|
||||
==========================
|
||||
|
||||
.. _sec-linux:
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
General Notes
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
* To download the source code, installing ``git`` is highly recommended.
|
||||
|
||||
* SCons is only available for Python 2, so building the Python 3 module requires
|
||||
two installations of Python (one of Python 2 and one of Python 3), even if you
|
||||
do not intend to build the Python 2 module.
|
||||
|
||||
* The following instructions use the system-installed versions of Python, but
|
||||
alternate installations such as the Anaconda distribution of Python can be
|
||||
used as well.
|
||||
|
||||
* Cython is only required to be installed for the version of Python that also
|
||||
has SCons installed; following the instructions below will install Cython for
|
||||
the version of Python 2 installed in the system directories. The minimum
|
||||
compatible Cython version is 0.23. If your distribution does not contain a
|
||||
suitable version, you may be able to install a more recent version using
|
||||
``pip``.
|
||||
|
||||
* Users of other distributions should install the equivalent packages, which
|
||||
may have slightly different names.
|
||||
|
||||
* In addition to the below operating systems, Cantera should work on any
|
||||
Unix-like system where the necessary prerequisites are available, but some
|
||||
additional configuration may be required.
|
||||
|
||||
.. _sec-ubuntu-debian-reqs:
|
||||
|
||||
Ubuntu & Debian
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
* Ubuntu 12.04 LTS (Precise Pangolin) or newer is required; 16.04 LTS (Xenial Xerus)
|
||||
or newer is recommended
|
||||
|
||||
* Debian 7.0 (Wheezy) or newer; 8.0 (Jessie) or newer is recommended
|
||||
|
||||
* The following packages must be installed to build any of the Cantera modules using
|
||||
your choice of package manager::
|
||||
|
||||
g++ python scons libboost-dev
|
||||
|
||||
* In addition to the general packages, building the Python 2 module also requires::
|
||||
|
||||
cython python-dev python-numpy python-numpy-dev python-setuptools
|
||||
|
||||
* In addition to the general packages, building the Python 3 module also requires::
|
||||
|
||||
cython python3 python3-dev python3-setuptools python3-numpy
|
||||
|
||||
* In addition to the general packages, building the Fortran module also requires::
|
||||
|
||||
gfortran
|
||||
|
||||
* In addition to the general packages, building the MATLAB toolbox also requires:
|
||||
|
||||
* MATLAB version later than 2009a
|
||||
|
||||
* Typically installed to::
|
||||
|
||||
/opt/MATLAB/R20YYn
|
||||
|
||||
where ``YY`` is a two digit year and ``n`` is either ``a`` or ``b``
|
||||
|
||||
.. _sec-fedora-reqs:
|
||||
|
||||
Fedora & RHEL
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
* The following packages must be installed to build any of the Cantera modules using
|
||||
your choice of package manager::
|
||||
|
||||
gcc-c++ python scons boost-devel
|
||||
|
||||
* In addition to the general packages, building the Python 2 module also requires::
|
||||
|
||||
python-setuptools python-devel Cython numpy
|
||||
|
||||
* In addition to the general packages, building the Python 3 module also requires::
|
||||
|
||||
python3 python3-setuptools python3-devel Cython python3-numpy
|
||||
|
||||
* In addition to the general packages, building the Fortran module also requires::
|
||||
|
||||
gcc-gfortran
|
||||
|
||||
* In addition to the general packages, building the MATLAB toolbox also requires:
|
||||
|
||||
* MATLAB version later than 2009a
|
||||
|
||||
* Typically installed to::
|
||||
|
||||
/opt/MATLAB/R20YYn
|
||||
|
||||
where ``YY`` is a two digit year and ``n`` is either ``a`` or ``b``
|
||||
|
||||
.. _sec-opensuse-reqs:
|
||||
|
||||
OpenSUSE & SUSE Linux Enterprise
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* OpenSUSE 13.2 or newer; Leap 42.2 or newer recommended
|
||||
|
||||
* The following packages must be installed to build any of the Cantera modules using
|
||||
your choice of package manager::
|
||||
|
||||
gcc-c++ python scons boost-devel
|
||||
|
||||
* In addition to the general packages, building the Python 2 module also requires::
|
||||
|
||||
python-Cython python-devel python-numpy python-numpy-devel python-setuptools
|
||||
|
||||
* In addition to the general packages, building the Python 3 module also requires::
|
||||
|
||||
python-Cython python3 python3-devel python3-setuptools python3-numpy python3-numpy-devel
|
||||
|
||||
* In addition to the general packages, building the Fortran module also requires::
|
||||
|
||||
gcc-fortran
|
||||
|
||||
* In addition to the general packages, building the MATLAB toolbox also requires:
|
||||
|
||||
* MATLAB version later than 2009a
|
||||
|
||||
* Typically installed to::
|
||||
|
||||
/opt/MATLAB/R20YYn
|
||||
|
||||
where ``YY`` is a two digit year and ``n`` is either ``a`` or ``b``
|
||||
|
||||
.. _sec-windows:
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
General Notes
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
* SCons is only available for Python 2, so building the Python 3 module requires
|
||||
two installations of Python (one of Python 2 and one of Python 3), even if you
|
||||
do not intend to build the Python 2 module.
|
||||
|
||||
* The build process will produce a Python module compatible with the version of
|
||||
Python used for the compilation. To generate different modules for other
|
||||
versions of Python, you will need to install those versions of Python and
|
||||
recompile.
|
||||
|
||||
* The following instructions use the versions of Python downloaded from
|
||||
https://www.python.org/downloads, but alternate installations such as the
|
||||
Anaconda distribution of Python can be used as well.
|
||||
|
||||
* If you want to build the Matlab toolbox and you have a 64-bit copy of Windows,
|
||||
by default you will be using a 64-bit copy of Matlab, and therefore you need
|
||||
to compile Cantera in 64-bit mode. For simplicity, it is highly recommended
|
||||
that you use a 64-bit version of Python to handle this automatically. Note
|
||||
that the default download from the Python website
|
||||
(https://www.python.org) is for a 32-bit installer, and you will
|
||||
need to select the 64-bit installer specifically.
|
||||
|
||||
* It is generally helpful to have SCons and Python in your ``PATH`` environment
|
||||
variable. This can be done by checking the appropriate box during the
|
||||
installation of Python or can be accomplished by adding the top-level Python
|
||||
directory and the ``Scripts`` subdirectory (e.g.,
|
||||
``C:\Python27;C:\Python27\Scripts``) to your ``PATH``. The dialog to change
|
||||
the ``PATH`` is accessible from::
|
||||
|
||||
Control Panel > System and Security > System > Advanced System Settings > Environment Variables
|
||||
|
||||
Make sure that the installation of Python that has SCons comes first on your
|
||||
``PATH``.
|
||||
|
||||
* In order to use SCons to install Cantera to a system folder (e.g. ``C:\Program
|
||||
Files\Cantera``) you must run the ``scons install`` command in a command
|
||||
prompt that has been launched by selecting the *Run as Administrator* option.
|
||||
|
||||
.. _sec-windows-reqs:
|
||||
|
||||
Windows Requirements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* Windows 7 or later; either 32-bit or 64-bit
|
||||
|
||||
* To build any of the Cantera modules, you will need to install
|
||||
|
||||
* Python 2.7
|
||||
|
||||
* https://www.python.org/downloads/
|
||||
|
||||
* Be sure to choose the appropriate architecture for your system - either
|
||||
32-bit or 64-bit
|
||||
|
||||
* When installing, make sure to choose the option to add to your ``PATH``
|
||||
|
||||
* SCons
|
||||
|
||||
* https://pypi.python.org/pypi/SCons
|
||||
|
||||
* Be sure to choose the appropriate architecture for your system - either
|
||||
32-bit or 64-bit
|
||||
|
||||
* One of the following supported compilers
|
||||
|
||||
* Microsoft compilers
|
||||
|
||||
* https://www.visualstudio.com/downloads/
|
||||
|
||||
* Known to work with Visual Studio 2013 (MSVC 12.0) and Visual Studio 2015
|
||||
(MSVC 14.0)
|
||||
|
||||
* MinGW compilers
|
||||
|
||||
* http://mingw-w64.org/
|
||||
|
||||
* http://tdm-gcc.tdragon.net/
|
||||
|
||||
* Known to work with Mingw-w64 3.0, which provides GCC 4.8. Expected to
|
||||
work with any version that provides a supported version of GCC and
|
||||
includes C++11 thread support.
|
||||
|
||||
* The version of MinGW from http://www.mingw.org/ cannot be used to build
|
||||
Cantera. Users must use MinGW-w64 or TDM-GCC.
|
||||
|
||||
* The Boost headers
|
||||
|
||||
* http://www.boost.org/doc/libs/1_63_0/more/getting_started/windows.html#get-boost
|
||||
|
||||
* It is not necessary to compile the Boost libraries since Cantera only uses
|
||||
the headers from Boost
|
||||
|
||||
* In addition to the general software, building the Python 2 module also requires
|
||||
|
||||
* Pip
|
||||
|
||||
* Pip should be distributed with Python version 2.7.9 and higher.
|
||||
If you are using an older version of Python, see
|
||||
`these instructions to install pip <http://stackoverflow.com/a/12476379>`_
|
||||
|
||||
* Most packages will be downloaded as Wheel (``*.whl``) files. To install
|
||||
these files, type::
|
||||
|
||||
pip install C:\Path\to\downloaded\file\package-file-name.whl
|
||||
|
||||
* Cython
|
||||
|
||||
* http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython
|
||||
|
||||
* Download the ``*.whl`` file for your Python architecture (32-bit or 64-bit)
|
||||
and Python 2.7 (indicated by ``cp27`` in the file name).
|
||||
|
||||
* Cython must be installed in the version of Python that has SCons installed
|
||||
|
||||
* NumPy
|
||||
|
||||
* http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
|
||||
|
||||
* Download the ``*.whl`` file for your Python architecture (32-bit or 64-bit)
|
||||
and Python 2.7 (indicated by ``cp27`` in the file name).
|
||||
|
||||
* In addition to the general software, building the Python 3 module also requires
|
||||
|
||||
* Python 3
|
||||
|
||||
* https://www.python.org/downloads/
|
||||
|
||||
* Cantera supports Python 3.3 and higher
|
||||
|
||||
* Be sure to choose the appropriate architecture for your system - either
|
||||
32-bit or 64-bit
|
||||
|
||||
* Be careful that the installation of Python 3 does not come before Python 2
|
||||
on your ``PATH`` environment variable
|
||||
|
||||
* Pip
|
||||
|
||||
* Pip should be distributed with Python version 3.4 and higher.
|
||||
If you are using an older version of Python, see
|
||||
`these instructions to install pip <http://stackoverflow.com/a/12476379>`_
|
||||
|
||||
* Most packages will be downloaded as Wheel (``*.whl``) files. To install
|
||||
these files, type::
|
||||
|
||||
pip3 install C:\Path\to\downloaded\file\package-file-name.whl
|
||||
|
||||
* Cython
|
||||
|
||||
* http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython
|
||||
|
||||
* Download the ``*.whl`` file for your Python architecture (32-bit or 64-bit)
|
||||
and Python 2.7 (indicated by ``cp27`` in the file name).
|
||||
|
||||
* Cython must be installed in the version of Python that has SCons installed
|
||||
|
||||
* NumPy
|
||||
|
||||
* http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
|
||||
|
||||
* Download the ``*.whl`` file for your Python architecture (32-bit or 64-bit)
|
||||
and Python 3.x (indicated by ``cp3x`` in the file name, where x matches
|
||||
your version of Python).
|
||||
|
||||
* In addition to the general software, building the MATLAB toolbox also requires:
|
||||
|
||||
* MATLAB version later than 2009a
|
||||
|
||||
* Typically installed to::
|
||||
|
||||
C:\Program Files\MATLAB\R20YYn
|
||||
|
||||
where ``YY`` is a two digit year and ``n`` is either ``a`` or ``b``/Applications/MATLAB_R2011a.app
|
||||
|
||||
.. _sec-macos:
|
||||
|
||||
OS X & macOS
|
||||
------------
|
||||
|
||||
General Notes
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
* It is not recommended to use the system-installed version of Python to build
|
||||
Cantera. Instead, the following instructions use Homebrew to install a
|
||||
separate copy of Python, independent from the system Python.
|
||||
|
||||
* To download the source code, installing ``git`` via HomeBrew is highly recommended.
|
||||
|
||||
* SCons is only available for Python 2, so building the Python 3 module requires
|
||||
two installations of Python (one of Python 2 and one of Python 3), even if you
|
||||
do not intend to build the Python 2 module.
|
||||
|
||||
* Cython is only required to be installed for the version of Python that also
|
||||
has SCons installed; following the instructions below will install Cython for
|
||||
the version of Python 2 installed in the system directories. The minimum
|
||||
compatible Cython version is 0.23.
|
||||
|
||||
.. _sec-mac-os-reqs:
|
||||
|
||||
OS X & macOS Requirements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* OS X 10.9 (Mavericks) or newer required; 10.10 (Yosemite) or newer is recommended
|
||||
|
||||
* To build any of the Cantera modules, you will need to install
|
||||
|
||||
* Xcode
|
||||
|
||||
* Download and install from the App Store
|
||||
|
||||
* From a Terminal, run::
|
||||
|
||||
sudo xcode-select --install
|
||||
|
||||
and agree to the Xcode license agreement
|
||||
|
||||
* Homebrew
|
||||
|
||||
* http://brew.sh
|
||||
|
||||
* From a Terminal, run::
|
||||
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
|
||||
* Once Homebrew is installed, the rest of the dependencies can be installed with::
|
||||
|
||||
brew install python scons boost
|
||||
|
||||
* In addition to the general software, building the Python 2 module also requires::
|
||||
|
||||
pip install cython numpy
|
||||
|
||||
* In addition to the general software, building the Python 3 module also requires::
|
||||
|
||||
brew install python3
|
||||
pip install cython
|
||||
pip3 install numpy
|
||||
|
||||
Note that Cython should be installed into the version of Python that has SCons
|
||||
installed.
|
||||
|
||||
* In addition to the general software, building the Fortran module also requires::
|
||||
|
||||
brew install gcc
|
||||
|
||||
* In addition to the general software, building the MATLAB toolbox also requires:
|
||||
|
||||
* MATLAB version later than 2009a
|
||||
|
||||
* Typically installed to::
|
||||
|
||||
/Applications/MATLAB_R20YYn.app
|
||||
|
||||
where ``YY`` is a two digit year and ``n`` is either ``a`` or ``b``
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
|
||||
.. _sec-source-code:
|
||||
|
||||
Downloading the Cantera source code
|
||||
===================================
|
||||
|
||||
Stable Release
|
||||
--------------
|
||||
|
||||
* **Option 1**: Check out the code using Git::
|
||||
|
||||
git clone --recursive https://github.com/Cantera/cantera.git
|
||||
cd cantera
|
||||
|
||||
Then, check out the tag of the most recent stable version::
|
||||
|
||||
git checkout tags/v2.3.0
|
||||
|
||||
A list of all the tags can be shown by::
|
||||
|
||||
git tag --list
|
||||
|
||||
* **Option 2**: Download the most recent source tarball from `Github
|
||||
<https://github.com/Cantera/cantera/releases>`_ and extract the
|
||||
contents.
|
||||
|
||||
Beta Release
|
||||
------------
|
||||
|
||||
* Check out the code using Git::
|
||||
|
||||
git clone --recursive https://github.com/Cantera/cantera.git
|
||||
cd cantera
|
||||
|
||||
Then pick either **Option 1** or **Option 2** below.
|
||||
|
||||
* **Option 1**: Check out the tag with the most recent beta release::
|
||||
|
||||
git checkout tags/v2.3.0b1
|
||||
|
||||
Note that the most recent beta version might be older than the most recent
|
||||
stable release. A list of all the tags, including stable and beta versions can
|
||||
be shown by::
|
||||
|
||||
git tag --list
|
||||
|
||||
* **Option 2**: Check out the branch with all the bug fixes leading to the
|
||||
next minor release of the stable version::
|
||||
|
||||
git checkout 2.3
|
||||
|
||||
This branch has all the work on the 2.3.x version of the software.
|
||||
|
||||
Development Version
|
||||
-------------------
|
||||
|
||||
Check out the code using Git::
|
||||
|
||||
git clone --recursive https://github.com/Cantera/cantera.git
|
||||
cd cantera
|
||||
|
||||
Note that by default, the ``master`` branch is checked out, containing all of
|
||||
the feature updates and bug fixes to the code since the previous stable release.
|
||||
The master branch is usually an "alpha" release, corresponding to the ``a`` in
|
||||
the version number, and does not usually get a tag.
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
|
||||
.. _sec-special-compiling-cases:
|
||||
|
||||
***********************
|
||||
Special Compiling Cases
|
||||
***********************
|
||||
|
||||
This guide explains some of the less common ways to build Cantera
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
.. _sec-intel-compilers:
|
||||
|
||||
Intel Compilers
|
||||
===============
|
||||
|
||||
* Before compiling Cantera, you may need to set up the appropriate environment
|
||||
variables for the Intel compiler suite, e.g.::
|
||||
|
||||
source /opt/intel/bin/compilervars.sh intel64
|
||||
|
||||
* For the Intel compiler to work with SCons, these environment variables need
|
||||
to be passed through SCons by using the command line option::
|
||||
|
||||
env_vars=all
|
||||
|
||||
* If you want to use the Intel MKL versions of BLAS and LAPACK, you will need
|
||||
to provide additional options. The following are typically correct on
|
||||
64-bit Linux systems::
|
||||
|
||||
blas_lapack_libs=mkl_rt blas_lapack_dir=$(MKLROOT)/lib/intel64
|
||||
|
||||
Your final SCons call might then look something like::
|
||||
|
||||
scons build env_vars=all CC=icc CXX=icpc FORTRAN=ifort blas_lapack_libs=mkl_rt blas_lapack_dir=$(MKLROOT)/lib/intel64
|
||||
|
||||
* When installing Cantera after building with the Intel compiler, the normal
|
||||
method of using ``sudo`` to install Cantera to the system default directories
|
||||
will not work because ``sudo`` does not pass the environment variables needed
|
||||
by the Intel compiler. Instead, you will need to do something like::
|
||||
|
||||
scons build ...
|
||||
sudo -s
|
||||
source /path/to/compilervars.sh intel64
|
||||
scons install
|
||||
exit
|
||||
|
||||
Another option is to set the :ref:`prefix <prefix>` option to a directory
|
||||
for which you have write permissions, and specify the ``USER`` value to the
|
||||
:ref:`python_prefix <python-prefix>` or :ref:`python3_prefix <python3-prefix>`
|
||||
option.
|
||||
|
|
@ -16,10 +16,7 @@ import sys, os, re
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
if sys.version_info[0] == 3:
|
||||
sys.path.insert(0, os.path.abspath('../../build/python3'))
|
||||
else:
|
||||
sys.path.insert(0, os.path.abspath('../../build/python2'))
|
||||
sys.path.insert(0, os.path.abspath('../../build/python'))
|
||||
|
||||
sys.path.append(os.path.abspath('.'))
|
||||
sys.path.append(os.path.abspath('./exts'))
|
||||
|
|
@ -41,22 +38,19 @@ extensions = [
|
|||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.autosummary',
|
||||
'mathjax',
|
||||
'sphinxcontrib.doxylink',
|
||||
'sphinxcontrib.katex', # Use KaTeX because it's faster and the main site uses it
|
||||
]
|
||||
|
||||
# @todo: Sphinx version 1.1 adds support for MathJax, so we can remove the
|
||||
# custom extension for that once that version becomes more standard
|
||||
katex_version = '0.10.0-beta'
|
||||
|
||||
autodoc_default_flags = ['members','show-inheritance','undoc-members']
|
||||
|
||||
autoclass_content = 'both'
|
||||
|
||||
mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
|
||||
|
||||
doxylink = {
|
||||
'ct' : (os.path.abspath('../../build/docs/Cantera.tag'),
|
||||
'../../doxygen/html/')
|
||||
'ct': (os.path.abspath('../../build/docs/Cantera.tag'),
|
||||
'../../doxygen/html/')
|
||||
}
|
||||
|
||||
# Ensure that the primary domain is the Python domain, since we've added the
|
||||
|
|
@ -77,7 +71,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = 'Cantera'
|
||||
copyright = '2001-2017, Cantera Developers'
|
||||
copyright = '2001-2018, Cantera Developers'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
|
|
@ -102,9 +96,6 @@ release = re.search('CANTERA_VERSION "(.*?)"', configh).group(1)
|
|||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
if sys.version_info[0] == 3:
|
||||
exclude_patterns.append('python/*')
|
||||
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
default_role = 'py:obj'
|
||||
|
|
@ -132,11 +123,43 @@ pygments_style = 'sphinx'
|
|||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'cttheme'
|
||||
html_sidebars = {
|
||||
'**': ['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html', 'numfocus.html'],
|
||||
}
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Copy the Bootstrap 4 font families.
|
||||
font_families = [
|
||||
# Default on Apple
|
||||
'-apple-system',
|
||||
# Default for older versions of Chrome on Mac
|
||||
'BlinkMacSystemFont',
|
||||
# Windows
|
||||
'"Segoe UI"',
|
||||
# Android
|
||||
'Roboto',
|
||||
# Standard fallbacks
|
||||
'"Helvetica Neue"', 'Arial', 'sans-serif',
|
||||
# Emoji fonts
|
||||
'"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"']
|
||||
|
||||
code_font_families = [
|
||||
'SFMono-Regular',
|
||||
'Menlo',
|
||||
'Monaco',
|
||||
'Consolas',
|
||||
'"Liberation Mono"',
|
||||
'"Courier New"', 'monospace'
|
||||
]
|
||||
html_theme_options = {
|
||||
'font_family': ','.join(font_families),
|
||||
'head_font_family': ','.join(font_families),
|
||||
'caption_font_family': ','.join(font_families),
|
||||
'code_font_family': ','.join(code_font_families),
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['.']
|
||||
|
|
@ -155,7 +178,7 @@ html_short_title = "Cantera"
|
|||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
html_favicon = "_static/favicon.ico"
|
||||
# html_favicon = "_static/favicon.ico"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ Thermodynamic Properties
|
|||
.. autoclass:: Shomate
|
||||
:no-undoc-members:
|
||||
|
||||
.. autoclass:: Adsorbate
|
||||
:no-undoc-members:
|
||||
|
||||
.. autoclass:: const_cp
|
||||
:no-undoc-members:
|
||||
|
||||
|
|
@ -122,6 +119,9 @@ Reactions
|
|||
.. autoclass:: edge_reaction
|
||||
:no-undoc-members:
|
||||
|
||||
.. autoclass:: stick
|
||||
:no-undoc-members:
|
||||
|
||||
Falloff Parameterizations
|
||||
-------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
============================
|
||||
Example: Hydrogen Combustion
|
||||
============================
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
.. _sec-defining-phases:
|
||||
|
||||
***************
|
||||
Defining Phases
|
||||
***************
|
||||
|
||||
*A guide to Cantera's input file format*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
intro
|
||||
input-files
|
||||
phases
|
||||
species
|
||||
reactions
|
||||
classes
|
||||
example-combustion
|
||||
|
|
@ -1,716 +0,0 @@
|
|||
.. py:currentmodule:: cantera.ctml_writer
|
||||
|
||||
.. _sec-input-files:
|
||||
|
||||
************************
|
||||
Working with Input Files
|
||||
************************
|
||||
|
||||
Before we can describe how to define phases, interfaces, and their components
|
||||
(elements, species, and reactions), we need to go over a few points about the
|
||||
mechanics of writing and processing input files.
|
||||
|
||||
Input File Syntax
|
||||
=================
|
||||
|
||||
An input file consists of *entries* and *directives*, both of which have a
|
||||
syntax much like functions. An entry defines an object---for example, a
|
||||
reaction, or a species, or a phase. A directive sets options that affect how the
|
||||
entry parameters are interpreted, such as the default unit system, or how
|
||||
certain errors should be handled.
|
||||
|
||||
Cantera's input files follow the syntax rules for Python, so if you're familiar
|
||||
with Python syntax you already understand many of the details and can probably
|
||||
skip ahead to :ref:`sec-dimensions`.
|
||||
|
||||
Entries have fields that can be assigned values. A species entry is shown below
|
||||
that has fields *name* and *atoms* (plus several others)::
|
||||
|
||||
species(name='C60', atoms='C:60')
|
||||
|
||||
Most entries have some fields that are required; these must be assigned values,
|
||||
or else processing of the file will abort and an error message will be
|
||||
printed. Other fields may be optional, and take default values if not assigned.
|
||||
|
||||
An entry may be either a *top-level entry* or an *embedded entry*. Top-level
|
||||
entries specify a phase, an interface, an element, a species, or a reaction, and
|
||||
begin in the first (leftmost) column. Embedded entries specify a model, or a
|
||||
group of parameters for a top-level entry, and are usually embedded in a field
|
||||
of another entry.
|
||||
|
||||
The fields of an entry are specified in the form ``<field_name> = <value>``, and may
|
||||
be listed on one line, or extend across several. For example, two entries for
|
||||
graphite are shown below. The first is compact::
|
||||
|
||||
stoichiometric_solid(name='graphite', species='C(gr)', elements='C', density=(2.2, 'g/cm3'))
|
||||
|
||||
and the second is formatted to be easier to read::
|
||||
|
||||
stoichiometric_solid(
|
||||
name = 'graphite',
|
||||
elements = 'C',
|
||||
species = 'C(gr)',
|
||||
density = (2.2, 'g/cm3')
|
||||
)
|
||||
|
||||
Both are completely equivalent.
|
||||
|
||||
The species ``C(gr)`` that appears in the definition of the graphite phase is
|
||||
also defined by a top-level entry. If the heat capacity of graphite is
|
||||
approximated as constant, then the following definition could be used::
|
||||
|
||||
species(name='C(gr)',
|
||||
atoms='C:1',
|
||||
thermo=const_cp(t0=298.15,
|
||||
h0=0.0,
|
||||
s0=(5.6, 'J/mol/K'), # NIST
|
||||
cp0=(8.43, 'J/mol/K'))) # Taylor and Groot (1980)
|
||||
|
||||
Note that the thermo field is assigned an embedded entry of type
|
||||
:class:`const_cp`. Entries are stored as they are encountered when the file is
|
||||
read, and only processed once the end of the file has been reached. Therefore,
|
||||
the order in which they appear is unimportant.
|
||||
|
||||
Comments
|
||||
--------
|
||||
|
||||
The character ``#`` is the comment character. Everything to the right of this
|
||||
character on a line is ignored::
|
||||
|
||||
# set the default units
|
||||
units(length = 'cm', # use centimeters for length
|
||||
quantity = 'mol') # use moles for quantity
|
||||
|
||||
Strings
|
||||
-------
|
||||
|
||||
Strings may be enclosed in single quotes or double quotes, but they must
|
||||
match. To create a string containing single quotes, enclose it in double quotes,
|
||||
and vice versa. If you want to create a string to extend over multiple lines,
|
||||
enclose it in triple quotes::
|
||||
|
||||
string1 = 'A string.'
|
||||
string2 = "Also a 'string'"
|
||||
string3 = """This is
|
||||
a
|
||||
string too."""
|
||||
|
||||
The multi-line form is useful when specifying a phase containing a large number
|
||||
of species::
|
||||
|
||||
species = """ H2 H O O2 OH H2O HO2 H2O2 C CH
|
||||
CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O
|
||||
CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH
|
||||
N NH NH2 NH3 NNH NO NO2 N2O HNO CN
|
||||
HCN H2CN HCNN HCNO HOCN HNCO NCO N2 AR C3H7
|
||||
C3H8 CH2CHO CH3CHO """
|
||||
|
||||
Sequences
|
||||
---------
|
||||
|
||||
A sequence of multiple items is specified by separating the items by commas and
|
||||
enclosing them in square brackets or parentheses. The individual items can have
|
||||
any type---strings, integers, floating-point numbers (or even entries or other
|
||||
lists). Square brackets are often preferred, since parentheses are also used for
|
||||
other purposes in the input file, but either can be used::
|
||||
|
||||
s0 = (3.5, 'J/mol/K') # these are
|
||||
s0 = [3.5, 'J/mol/K'] # equivalent
|
||||
|
||||
Variables
|
||||
---------
|
||||
|
||||
Another way to specify the species C(gr) is shown here::
|
||||
|
||||
graphite_thermo = const_cp(t0=298.15,
|
||||
h0=0.0,
|
||||
s0=(5.6, 'J/mol/K'), # NIST
|
||||
cp0=(8.43, 'J/mol/K')) # Taylor and Groot (1980)
|
||||
|
||||
species(name='C(gr)', atoms='C:1', thermo=graphite_thermo)
|
||||
|
||||
In this form, the ``const_cp`` entry is stored in a variable, instead of being
|
||||
directly embedded within the species entry. The *thermo* field is assigned this
|
||||
variable.
|
||||
|
||||
Variables can also be used for any other parameter type. For example, if you are
|
||||
defining several phases in the file, and you want to set them all to the same
|
||||
initial pressure, you could define a pressure variable::
|
||||
|
||||
P_initial = (2.0, 'atm')
|
||||
|
||||
and then set the pressure field in each embedded state entry to this variable.
|
||||
|
||||
Omitting Field Names
|
||||
--------------------
|
||||
|
||||
Field names may be omitted if the values are entered in the order specified in
|
||||
the entry declaration. (Entry declarations are the text printed on a colored
|
||||
background in the following chapters.) It is also possible to omit only some of
|
||||
the field names, as long as these fields are listed first, in order, before any
|
||||
named fields.
|
||||
|
||||
For example, The first four entries below are equivalent, while the last two are
|
||||
incorrect and would generate an error when processed::
|
||||
|
||||
element(symbol="Ar", atomic_mass=39.948) # OK
|
||||
element(atomic_mass=39.948, symbol='Ar') # OK
|
||||
element('Ar', atomic_mass=39.948) # OK
|
||||
element("Ar", 39.948) # OK
|
||||
|
||||
element(39.948, "Ar") # error
|
||||
element(symbol="Ar", 39.948) # error
|
||||
|
||||
Validation
|
||||
----------
|
||||
|
||||
Normally, Cantera will make some checks for errors in the definitions of species
|
||||
and reactions, such as checking for duplicate reactions. To slightly speed up
|
||||
processing (if a mechanism has previously been validated), or in case of
|
||||
spurious validation errors, validation can be disabled using the
|
||||
:func:`validate` function. For example, to disable validation of reactions, add
|
||||
the following to the CTI file::
|
||||
|
||||
validate(reactions='no')
|
||||
|
||||
.. _sec-dimensions:
|
||||
|
||||
Dimensional Values
|
||||
==================
|
||||
|
||||
Many fields have numerical values that represent dimensional quantities---a
|
||||
pressure, or a density, for example. If these are entered without specifying the
|
||||
units, the default units (set by the :class:`units` directive described in
|
||||
:ref:`sec-default-units`) will be used. However, it is also possible to specify
|
||||
the units for each individual dimensional quantity (unless stated
|
||||
otherwise). All that is required is to group the value in parentheses or square
|
||||
brackets with a string specifying the units::
|
||||
|
||||
pressure = 1.0e5 # default is Pascals
|
||||
pressure = (1.0, 'bar') # this is equivalent
|
||||
density = (4.0, 'g/cm3')
|
||||
density = 4000.0 # kg/m3
|
||||
|
||||
Compound unit strings may be used, as long as a few rules are followed:
|
||||
|
||||
1. Units in the denominator follow ``/``.
|
||||
2. Units in the numerator follow ``-``, except for the first one.
|
||||
3. Numerical exponents follow the unit string without a ``^`` character, and must
|
||||
be in the range 2--6. Negative values are not allowed.
|
||||
|
||||
Examples of compound units::
|
||||
|
||||
A = (1.0e20, 'cm6/mol2/s') # OK
|
||||
h = (6.626e-34, 'J-s') # OK
|
||||
density = (3.0, 'g/cm3') # OK
|
||||
A = (1.0e20, 'cm^6/mol/s') # error (^)
|
||||
A = (1.0e20, 'cm6/mol2-s') # error ('s' should be in denominator)
|
||||
density = (3.0, 'g-cm-3') # error (negative exponent)
|
||||
|
||||
.. _sec-default-units:
|
||||
|
||||
Setting the Default Units
|
||||
-------------------------
|
||||
|
||||
The default unit system may be set with the :func:`units` directive. Note
|
||||
that unit conversions are not done until the entire file has been read. Only one
|
||||
units directive should be present in a file, and the defaults it specifies apply
|
||||
to the entire file. If the file does not contain a units directive, the default
|
||||
units are meters, kilograms, kilomoles, and seconds.
|
||||
|
||||
Shown below are two equivalent ways of specifying the site density for an
|
||||
interface. In the first version, the site density is specified without a units
|
||||
string, and so its units are constructed from the default units for quantity and
|
||||
length, which are set with a units directive::
|
||||
|
||||
units(length = 'cm', quantity = 'molec')
|
||||
interface(name = 'Si-100',
|
||||
site_density = 1.0e15, # molecules/cm2 (default units)
|
||||
# ...
|
||||
)
|
||||
|
||||
The second version uses a different default unit system, but overrides the
|
||||
default units by specifying an explicit units string for the site density::
|
||||
|
||||
units(length = 'cm', quantity = 'mol')
|
||||
interface(name = 'Si-100',
|
||||
site_density = (1.0e15, 'molec/cm2') # override default units
|
||||
# ...
|
||||
)
|
||||
|
||||
The second version is equivalent to the first, but would be very different if
|
||||
the units of the site density were not specified!
|
||||
|
||||
The *length*, *quantity* and *time* units are used to construct the units for
|
||||
reaction pre-exponential factors. The *energy* units are used for molar
|
||||
thermodynamic properties, in combination with the units for *quantity*.
|
||||
|
||||
Since activation energies are often specified in units other than those used for
|
||||
thermodynamic properties, a separate field is devoted to the default units for
|
||||
activation energies::
|
||||
|
||||
units(length = 'cm', quantity = 'mol', act_energy = 'kcal/mol')
|
||||
kf = Arrhenius(A = 1.0e14, b = 0.0, E = 54.0) # E is 54 kcal/mol
|
||||
|
||||
See :func:`units` for the declaration of the units directive.
|
||||
|
||||
Recognized Units
|
||||
----------------
|
||||
|
||||
Cantera recognizes the following units in various contexts:
|
||||
|
||||
=========== ==============
|
||||
field allowed values
|
||||
=========== ==============
|
||||
length ``'cm', 'm', 'mm'``
|
||||
quantity ``'mol', 'kmol', 'molec'``
|
||||
time ``'s', 'min', 'hr', 'ms'``
|
||||
energy ``'J', 'kJ', 'cal', 'kcal'``
|
||||
act_energy ``'kJ/mol', 'J/mol', 'J/kmol', 'kcal/mol', 'cal/mol', 'eV', 'K'``
|
||||
pressure ``'Pa', 'atm', 'bar'``
|
||||
=========== ==============
|
||||
|
||||
Processing Input Files
|
||||
======================
|
||||
|
||||
A Two-step Process
|
||||
------------------
|
||||
|
||||
From the point of view of the user, it appears that a Cantera application that
|
||||
imports a phase definition reads the input file, and uses the information there
|
||||
to construct the object representing the phase or interface in the
|
||||
application. While this is the net effect, it is actually a two-step
|
||||
process. When a constructor like ``Solution`` is called to import a phase definition
|
||||
from a file, a preprocessor runs automatically to read the input file and create
|
||||
a string that contains the same information but in an XML-based format called
|
||||
CTML. After the preprocessor finishes, Cantera imports the phase definition from
|
||||
this CTML data.
|
||||
|
||||
Two File Formats
|
||||
----------------
|
||||
|
||||
Why two file formats? There are several reasons. XML is a widely-used standard
|
||||
for data files, and it is designed to be relatively easy to parse. This makes it
|
||||
possible for other applications to use Cantera CTML data files, without
|
||||
requiring the substantial chemical knowledge that would be required to use .cti
|
||||
files. For example, "web services" (small applications that run remotely over a
|
||||
network) are often designed to accept XML input data over the network, perform a
|
||||
calculation, and send the output in XML back across the network. Supporting an
|
||||
XML-based data file format facilitates using Cantera in web services or other
|
||||
network computing applications.
|
||||
|
||||
The difference between the high-level description in a .cti input file and the
|
||||
lower-level description in the CTML file may be illustrated by how reactions are
|
||||
handled. In the input file, the reaction stoichiometry and its reversibility or
|
||||
irreversibility are determined from the reaction equation. For example::
|
||||
|
||||
O + HCCO <=> H + 2 CO
|
||||
|
||||
specifies a reversible reaction between an oxygen atom and the ketenyl radical
|
||||
HCCO to produce one hydrogen atom and two carbon monoxide molecules. If ``<=>``
|
||||
were replaced with ``=>``, then it would specify that the reaction should be
|
||||
treated as irreversible.
|
||||
|
||||
Of course, this convention is not spelled out in the input file---the parser
|
||||
simply has to know it, and has to also know that a "reactant" appears on the
|
||||
left side of the equation, a "product" on the right, that the optional number in
|
||||
front of a species name is its stoichiometric coefficient (but if missing the
|
||||
value is one), etc. The preprocessor does know all this, but we cannot expect
|
||||
the same level of knowledge of chemical conventions by a generic XML parser.
|
||||
|
||||
Therefore, in the CTML file, reactions are explicitly specified to be reversible
|
||||
or irreversible, and the reactants and products are explicitly listed with their
|
||||
stoichiometric coefficients. The XML file is, in a sense, a "dumbed-down"
|
||||
version of the input file, spelling out explicitly things that are only implied
|
||||
in the input file syntax, so that "dumb" (i.e., easy to write) parsers can be
|
||||
used to read the data with minimal risk of misinterpretation.
|
||||
|
||||
The reaction definition::
|
||||
|
||||
reaction( "O + HCCO <=> H + 2 CO", [1.00000E+14, 0, 0])
|
||||
|
||||
in the input file is translated by the preprocessor to the following CTML text:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<reaction id="0028" reversible="yes">
|
||||
<equation>O + HCCO [=] H + 2 CO</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s"> 1.000000E+14</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">0.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>HCCO:1 O:1</reactants>
|
||||
<products>H:1 CO:2</products>
|
||||
</reaction>
|
||||
|
||||
The CTML version is much more verbose, and would be much more tedious to write
|
||||
by hand, but is much easier to parse, particularly since it is not necessary to
|
||||
write a custom parser---virtually any standard XML parser, of which there are
|
||||
many, can be used to read the CTML data.
|
||||
|
||||
So in general files that are easy for knowledgeable users (you) to write are more
|
||||
difficult for machines to parse, because they make use of high-level
|
||||
application-specific knowledge and conventions to simplify the
|
||||
notation. Conversely, files that are designed to be easily parsed are tedious to
|
||||
write because so much has to be spelled out explicitly. A natural solution is to
|
||||
use two formats, one designed for writing by humans, the other for reading by
|
||||
machines, and provide a preprocessor to convert the human-friendly format to the
|
||||
machine-friendly one.
|
||||
|
||||
Preprocessor Internals: the ``ctml_writer`` Module
|
||||
--------------------------------------------------
|
||||
|
||||
If you are interested in seeing the internals of how the preprocessing works,
|
||||
take a look at file ``ctml_writer.py`` in the Cantera Python package. Or simply
|
||||
start Python, and type::
|
||||
|
||||
>>> import cantera.ctml_writer
|
||||
>>> help(cantera.ctml_writer)
|
||||
|
||||
The ``ctml_writer.py`` module can also be run as a script to convert input .cti
|
||||
files to CTML. For example, if you have an input file ``phasedefs.cti``, then
|
||||
simply type at the command line::
|
||||
|
||||
python -m cantera.ctml_writer phasedefs.cti
|
||||
|
||||
to create CTML file ``phasedefs.xml``. On systems which support running Python
|
||||
scripts directly, a script to run ``ctml_writer`` directly is also installed. If
|
||||
the Cantera ``bin`` directory is on your ``PATH``, you can also do the
|
||||
conversion by running::
|
||||
|
||||
ctml_writer phasedefs.cti
|
||||
|
||||
This can be used to generate XML input files for use on systems where the
|
||||
Cantera Python package is not installed. Of course, most of the time creation of
|
||||
the CTML file will happen behind the scenes, and you will not need to be
|
||||
concerned with CTML files at all.
|
||||
|
||||
Error Handling
|
||||
==============
|
||||
|
||||
During processing of an input file, errors may be encountered. These could be
|
||||
syntax errors, or could be ones that are flagged as errors by Cantera due to
|
||||
some apparent inconsistency in the data---an unphysical value, a species that
|
||||
contains an undeclared element, a reaction that contains an undeclared species,
|
||||
missing species or element definitions, multiple definitions of elements,
|
||||
species, or reactions, and so on.
|
||||
|
||||
Syntax Errors
|
||||
-------------
|
||||
|
||||
Syntax errors are caught by the Python preprocessor, not by Cantera, and must be
|
||||
corrected before proceeding further. Python prints a "traceback" that allows
|
||||
you to find the line that contains the error. For example, consider the
|
||||
following input file, which is intended to create a gas with the species and
|
||||
reactions of GRI-Mech 3.0, but has a misspelled the field name ``reactions``::
|
||||
|
||||
ideal_gas(name = 'gas',
|
||||
elements = 'H O',
|
||||
species = 'gri30: all',
|
||||
reactionss = 'gri30: all')
|
||||
|
||||
When this definition is imported into an application, an error message like the
|
||||
following would be printed to the screen, and execution of the program or script
|
||||
would terminate. ::
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
File "/some/path/Cantera/importFromFile.py", line 18, in importPhase
|
||||
return importPhases(file, [name], loglevel, debug)[0]
|
||||
File "/some/path/Cantera/importFromFile.py", line 25, in importPhases
|
||||
s.append(solution.Solution(src=file,id=nm,loglevel=loglevel,debug=debug))
|
||||
File "/some/path/solution.py", line 39, in __init__
|
||||
preprocess = 1, debug = debug)
|
||||
File "/some/path/Cantera/XML.py", line 35, in __init__
|
||||
self._xml_id = _cantera.xml_get_XML_File(src, debug)
|
||||
cantera.error:
|
||||
|
||||
************************************************
|
||||
Cantera Error!
|
||||
************************************************
|
||||
|
||||
Procedure: ct2ctml
|
||||
Error: Error converting input file "./gas.cti" to CTML.
|
||||
Python command was: '/usr/bin/python'
|
||||
The exit code was: 4
|
||||
-------------- start of converter log --------------
|
||||
TypeError on line 4 of './gas.cti':
|
||||
__init__() got an unexpected keyword argument 'reactionss'
|
||||
|
||||
| Line |
|
||||
| 1 | ideal_gas(name = 'gas',
|
||||
| 2 | elements = 'H O',
|
||||
| 3 | species = 'gri30: all',
|
||||
> 4 > reactionss = 'gri30: all')
|
||||
| 5 |
|
||||
--------------- end of converter log ---------------
|
||||
|
||||
The top part of the error message shows the chain of functions that were called
|
||||
before the error was encountered. For the most part, these are internal Cantera
|
||||
functions not of direct concern here. The relevant part of this error message is
|
||||
the part starting with the "Cantera Error" heading, and specifically the
|
||||
contents of the *converter log* section. This message says that that on line 4
|
||||
of ``gas.cti``, the the keyword argument ``reactionss`` was not
|
||||
recognized. Seeing this message, it is clear that the problem is that
|
||||
*reactions* is misspelled.
|
||||
|
||||
Cantera Errors
|
||||
--------------
|
||||
|
||||
Now let's consider the other class of errors---ones that Cantera, not Python,
|
||||
detects. Continuing the example above, suppose that the misspelling is
|
||||
corrected, and the input file processed again. Again an error message results,
|
||||
but this time it is from Cantera::
|
||||
|
||||
cantera.error:
|
||||
Procedure: installSpecies
|
||||
Error: species C contains undeclared element C
|
||||
|
||||
The problem is that the phase definition specifies that all species are to be
|
||||
imported from dataset gri30, but only the elements H and O are declared. The
|
||||
gri30 datset contains species composed of the elements H, O, C, N, and Ar. If
|
||||
the definition is modified to declare these additional elements::
|
||||
|
||||
ideal_gas(name = 'gas',
|
||||
elements = 'H O C N Ar',
|
||||
species = 'gri30: all',
|
||||
reactions = 'gri30: all')
|
||||
|
||||
it may be imported successfully.
|
||||
|
||||
Errors of this type do not have to be fatal, as long as you tell Cantera how you
|
||||
want to handle them. You can, for example, instruct Cantera to quietly skip
|
||||
importing any species that contain undeclared elements, instead of flagging them
|
||||
as errors. You can also specify that reactions containing undeclared species
|
||||
(also usually an error) should be skipped. This allows you to very easily
|
||||
extract a portion of a large reaction mechanism, as described in :ref:`sec-phase-options`.
|
||||
|
||||
.. _sec-ck-format-conversion:
|
||||
|
||||
Converting CK-format files
|
||||
==========================
|
||||
|
||||
Many existing reaction mechanism files are in "CK format," by which we mean
|
||||
the input file format developed for use with the Chemkin-II software package
|
||||
as specified in the report describing the Chemkin software [SAND89]_.
|
||||
|
||||
Cantera comes with a converter utility program ``ck2cti`` (or ``ck2cti.py``)
|
||||
that converts CK format into Cantera format. This program should be run from
|
||||
the command line first to convert any CK files you plan to use into Cantera
|
||||
format (CTI format).
|
||||
|
||||
Usage::
|
||||
|
||||
ck2cti [--input=<filename>]
|
||||
[--thermo=<filename>]
|
||||
[--transport=<filename>]
|
||||
[--surface=<filename>]
|
||||
[--id=<phase-id>]
|
||||
[--output=<filename>]
|
||||
[--permissive]
|
||||
[-d | --debug]
|
||||
|
||||
Each of the terms in square brackets is an option that can be passed on the
|
||||
command line to ``ck2cti``. ``--input`` is the chemistry input file, containing
|
||||
a list of all the element names that are used, a list of all the species names,
|
||||
and a list of all the reactions to be considered between the species. This file
|
||||
can also optionally contain thermodynamic information for the species. If the
|
||||
``--input`` file does not contain the thermodynamic data, a separate file
|
||||
containing this information must be specified to the `--thermo`` option. Finally,
|
||||
the ``--input`` file can also optionally contain transport information for the
|
||||
species. If it does not, and the user wishes to use a part of Cantera that relies
|
||||
on some transport properties, the ``--transport`` option must be used to specify
|
||||
the file containing all the transport data for the species.
|
||||
|
||||
For the case of a surface mechanism, the gas phase input file should be
|
||||
specified as ``--input`` and the surface phase input file should be specified as
|
||||
``--surface``.
|
||||
|
||||
Example::
|
||||
|
||||
ck2cti --input=chem.inp --thermo=therm.dat --transport=tran.dat
|
||||
|
||||
If the output file name is not given, an output file with the same name as the
|
||||
input file, with the extension changed to '.cti'.
|
||||
|
||||
If the ck2cti script is not on your path but the Cantera Python module is,
|
||||
ck2cti can also be used by running::
|
||||
|
||||
python -m cantera.ck2cti --input=chem.inp --thermo=therm.dat --transport=tran.dat
|
||||
|
||||
An input file containing only species definitions (which can be referenced from
|
||||
phase definitions in other input files) can be created by specifying only a
|
||||
thermo file.
|
||||
|
||||
Many existing CK format files cause errors in ``ck2cti`` when they are
|
||||
processed. Some of these errors may be avoided by specifying the
|
||||
``--permissive`` option. This option allows certain recoverable parsing errors
|
||||
(e.g. duplicate transport or thermodynamic data) to be ignored. Other errors
|
||||
may be caused by incorrect formatting of lines in one or more of the input files.
|
||||
|
||||
Debugging common errors in CK files
|
||||
-----------------------------------
|
||||
|
||||
When ``ck2cti`` encounters an error, it attempts to print the surrounding
|
||||
information to help you to locate the error. Many of the most common errors
|
||||
are due to an inconsistency of the input files from their standard, as defined
|
||||
in the report for Chemkin referenced above. These errors include:
|
||||
|
||||
* Each section of the input files must be started with a keyword representing that
|
||||
section and ending with the keyword ``END``. Keywords that may begin a section
|
||||
include:
|
||||
|
||||
- ``ELEMENTS`` or ``ELEM``
|
||||
- ``SPECIES`` or ``SPEC``
|
||||
- ``THERMO`` or ``THERMO ALL``
|
||||
- ``REACTIONS`` or ``REAC``
|
||||
- ``TRANSPORT``
|
||||
|
||||
* The thermodynamic data is read in a fixed format. This means that each
|
||||
column of the input has a particular meaning. *Many common errors are
|
||||
generated because information is missing or in the wrong column. Check
|
||||
thoroughly for extraneous or missing spaces.* The format for each
|
||||
thermodynamic entry should be as follows::
|
||||
|
||||
N2 N 2 G200.000 6000.000 1000.00 1
|
||||
2.95258000E+00 1.39690000E-03-4.92632000E-07 7.86010000E-11-4.60755000E-15 2
|
||||
-9.23949000E+02 5.87189000E+00 3.53101000E+00-1.23661000E-04-5.02999000E-07 3
|
||||
2.43531000E-09-1.40881000E-12-1.04698000E+03 2.96747000E+00 4
|
||||
|
||||
The following table is adapted from the Chemkin manual [SAND89]_ to describe the
|
||||
column positioning of each required part of the entry. Empty columns should be
|
||||
filled with spaces.
|
||||
|
||||
+---------+-------------------------------------+--------+
|
||||
|Line No. | Contents | Column |
|
||||
+=========+=====================================+========+
|
||||
| 1 | Species Name | 1--18 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Date (Optional) | 19--24 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Atomic Symbols and formula | 25--44 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Phase of species (S, L, G) | 45 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Low temperature | 46--55 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | High temperature | 56--65 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Common temperature | 66--73 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | Additional Atomic Symbols | 74--78 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 1 | The integer ``1`` | 80 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 2 | Coefficients :math:`a_1` | 1--75 |
|
||||
| | to :math:`a_5` for the upper | |
|
||||
| | temperature interval | |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 2 | The integer ``2`` | 80 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 3 | Coefficients :math:`a_6,\ a_7` | 1--75 |
|
||||
| | for the upper temperature interval, | |
|
||||
| | and :math:`a_1,\ a_2,\ a_3` for | |
|
||||
| | the lower temperature interval | |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 3 | The integer ``3`` | 80 |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 4 | Coefficients :math:`a_4` through | 1--60 |
|
||||
| | :math:`a_7` for the lower | |
|
||||
| | temperature interval | |
|
||||
+---------+-------------------------------------+--------+
|
||||
| 4 | The integer ``4`` | 80 |
|
||||
+---------+-------------------------------------+--------+
|
||||
|
||||
The first 18 columns are reserved for the species name. The name assigned
|
||||
to the species in the thermodynamic data must be the same as the species
|
||||
name defined in the ``SPECIES`` section. If the species name is shorter
|
||||
than 18 characters, the rest of the characters should be filled by spaces.
|
||||
The next six columns (columns 19--24) are typically used to write a date;
|
||||
they are not used further. The next 20 columns (25--44) are used to
|
||||
specify the elemental composition of the species. In column 45, the phase
|
||||
of the species (``S``, ``L``, or ``G`` for solid, liquid, or gas
|
||||
respectively) should be specified. The next 28 columns are reserved for
|
||||
the temperatures that delimit the ranges of the polynomials specified on
|
||||
the next several lines. The first two temperatures have a width of 10
|
||||
columns each (46--55 and 56--65), and represent the lowest temperature and
|
||||
highest temperature for which the polynomials are valid. The last
|
||||
temperature has a width of 8 columns (66--73) and is the "common"
|
||||
temperature, where the switch from low to high occurs. The next 5 columns
|
||||
(74--78) are reserved for atomic symbols and are usually left blank for
|
||||
the default behavior. Column 79 is blank and finally, the row is ended in
|
||||
column 80 with the integer ``1``.
|
||||
|
||||
The next three lines of the thermodynamic entry have a similar format.
|
||||
They contain the coefficients of the polynomial described in
|
||||
:ref:`sec-thermo-models` for the NASA 7-coefficient polynomial formulation.
|
||||
The second row of the thermo entry (the first after the information row)
|
||||
contains the first five coefficients that apply the the temperature range
|
||||
between the midpoint and the upper limit. 15 columns are alloted for each
|
||||
coefficient (for a total of 75 columns), with no spaces between them.
|
||||
Although the entry above shows spaces between positive coefficients, it is
|
||||
to be noted that this is done only for formatting consistency with other
|
||||
lines that contain negative numbers. After the coefficients, four spaces
|
||||
in columns 76--79 are followed by the integer ``2`` in column 80. On the
|
||||
next line, the last two coefficients for the upper temperature range and
|
||||
the first three coefficients for the lower temperature range are
|
||||
specified. Once again, this takes up the first 75 columns, columns 76--79
|
||||
are blank, and the integer ``3`` is in column 80. Finally, on the last
|
||||
line of a particular entry, the last four coefficients of the lower
|
||||
temperature range are specified in columns 1--60, 19 blank spaces are
|
||||
present, and the integer ``4`` is in column 80. The 19 blank spaces in the
|
||||
last line are part of the standard. However, since the original Chemkin
|
||||
interpreter ignored those spaces, researchers began using that space to
|
||||
store additional information that was not necessary for the input file.
|
||||
Although these numbers create an error in ``ck2cti`` if present, they are
|
||||
harmless and can be ignored by using the ``--permissive`` option.
|
||||
|
||||
* It may be the case that scientific formatted numbers are missing the ``E``.
|
||||
In this case, numbers often show up as ``1.1+01``, when they should be
|
||||
``1.1E+01``. You can fix this with a simple Regular Expression find and
|
||||
replace::
|
||||
|
||||
Find: (\d+\.\d+)([+-]\d+)
|
||||
Replace: \1E\2
|
||||
|
||||
* The transport data file also has a specified format, as described in
|
||||
[SAND98]_, although the format is not as strict as for the thermodynamic
|
||||
entries. In particular, the first 15 columns of a line are reserved for
|
||||
the species name. *One common source of errors is a species that is present
|
||||
in the transport data file, but not in the thermodynamic data or in
|
||||
the species list; or a species that is present in the species list but
|
||||
not the transport data file.* The rest of the columns on a given line have
|
||||
no particular format, but must be present in the following order:
|
||||
|
||||
+------------------+------------------------------------------------------+
|
||||
| Parameter Number | Parameter Name |
|
||||
+==================+======================================================+
|
||||
| 1 | An integer with value 0, 1, or 2 indicating |
|
||||
| | monatomic, linear, or non-linear molecular geometry. |
|
||||
+------------------+------------------------------------------------------+
|
||||
| 2 | The Lennard-Jones potential well depth |
|
||||
| | :math:`\varepsilon/k_B` in Kelvin |
|
||||
+------------------+------------------------------------------------------+
|
||||
| 3 | The Lennard-Jones collision diameter :math:`\sigma` |
|
||||
| | in Angstrom |
|
||||
+------------------+------------------------------------------------------+
|
||||
| 4 | The dipole moment :math:`\mu` in Debye |
|
||||
+------------------+------------------------------------------------------+
|
||||
| 5 | The polarizability :math:`\alpha` in Angstrom |
|
||||
+------------------+------------------------------------------------------+
|
||||
| 6 | The rotational relaxation collision number |
|
||||
| | :math:`Z_{rot}` at 298 K |
|
||||
+------------------+------------------------------------------------------+
|
||||
|
||||
Another common error is if all 6 of these numbers are not present for every
|
||||
species.
|
||||
|
||||
.. [SAND89] See R. J. Kee, F. M. Rupley, and J. A. Miller, Sandia National
|
||||
Laboratories Report SAND89-8009 (1989).
|
||||
http://www.osti.gov/scitech/biblio/5681118
|
||||
|
||||
.. [SAND98] See R. J. Kee, G. Dixon-Lewis, J. Warnatz, M. E. Coltrin, J. A. Miller,
|
||||
H. K. Moffat, Sandia National Laboratories Report SAND86-8246B (1998).
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
************
|
||||
Introduction
|
||||
************
|
||||
|
||||
Virtually every Cantera simulation involves one or more phases of
|
||||
matter. Depending on the calculation being performed, it may be necessary to
|
||||
evaluate thermodynamic properties, transport properties, and/or homogeneous
|
||||
reaction rates for the phase(s) present. In problems with multiple phases, the
|
||||
properties of the interfaces between phases, and the heterogeneous reaction
|
||||
rates at these interfaces, may also be required.
|
||||
|
||||
Before the properties can be evaluated, each phase must be defined, meaning that
|
||||
the models to use to compute its properties and reaction rates must be
|
||||
specified, along with any parameters the models require. For example, a solid
|
||||
phase might be defined as being incompressible, with a specified density and
|
||||
composition. A gaseous phase for a combustion simulation might be defined as an
|
||||
ideal gas consisting of a mixture of many species that react with one another
|
||||
via a specified set of reactions.
|
||||
|
||||
For phases containing multiple species and reactions, a large amount of data is
|
||||
required to define the phase, since the contribution of each species to the
|
||||
thermodynamic and transport properties must be specified, and rate information
|
||||
must be given for each reaction. While this could be done directly in an
|
||||
application program, a better approach is put the phase and interface
|
||||
definitions in a text file that can be read by the application, so that a given
|
||||
phase model can be re-used for other simulations.
|
||||
|
||||
This guide describes how to write such files to define phases and interfaces for
|
||||
use in Cantera simulations. Section :ref:`sec-input-files` contains a summary of
|
||||
some basic rules for writing input files, a discussion of how they are
|
||||
processed, and of how errors are handled. In Section :ref:`sec-phases`, we will
|
||||
go over how to define phases and interfaces, including how to import species and
|
||||
reactions from external files. Then in :ref:`sec-species` and
|
||||
:ref:`sec-reactions`, we'll look in depth at how to specify the component parts
|
||||
of phase and interface models---the elements, species, and reactions.
|
||||
|
||||
.. In Section ##REF##, we'll put it all together, and present some complete,
|
||||
realistic example problems, showing the input file containing the definitions
|
||||
of all phases and interfaces, the application code to use the input file to
|
||||
solve a problem, and the resulting output.
|
||||
|
|
@ -1,500 +0,0 @@
|
|||
.. py:currentmodule:: cantera.ctml_writer
|
||||
|
||||
.. _sec-phases:
|
||||
|
||||
***************************
|
||||
Phases and their Interfaces
|
||||
***************************
|
||||
|
||||
Now that we have covered how to write syntactically-correct input files, we can
|
||||
turn our attention to the content of the file. We'll start by describing the
|
||||
entries for phases of various types, and the look at how to define interfaces
|
||||
between phases.
|
||||
|
||||
Phases
|
||||
======
|
||||
|
||||
For each phase that appears in a problem, a corresponding entry should be
|
||||
present in the input file(s). For example, suppose we want to conduct a
|
||||
simulation with detailed chemistry of an idealized solid-oxide fuel cell shown
|
||||
below. The problem involves three solid phases (A nickel anode, a
|
||||
platinum cathode, and an oxygen-conducting yttrium-stabilized zirconia
|
||||
electrolyte), and two different gas phases (a fuel mixture on the anode side,
|
||||
and air on the cathode side). The problem also involves a number of interfaces
|
||||
at which heterogeneous chemistry may occur---two gas-metal interfaces, two
|
||||
gas-electrolyte interfaces, and two metal-electrolyte interfaces.
|
||||
|
||||
.. figure:: /_static/images/sofc-phases.png
|
||||
:align: center
|
||||
|
||||
**Phases entering into a hypothetical microkinetic simulation of an
|
||||
idealized solid-oxide fuel cell.**
|
||||
|
||||
How to carry out this fuel cell simulation is beyond the scope of this document;
|
||||
we introduce it here only to give an example of the types of phases and
|
||||
interfaces that might need to be defined in order to carry out a simulation. (Of
|
||||
course, many simulations with Cantera only require defining a single phase.)
|
||||
|
||||
There are several different types of entries, corresponding to different types
|
||||
of phases. Phases are created using one of the directives corresponding to an
|
||||
implemented phase type:
|
||||
|
||||
* :class:`ideal_gas`
|
||||
* :class:`stoichiometric_solid`
|
||||
* :class:`stoichiometric_liquid`
|
||||
* :class:`metal`
|
||||
* :class:`semiconductor`
|
||||
* :class:`incompressible_solid`
|
||||
* :class:`lattice`
|
||||
* :class:`lattice_solid`
|
||||
* :class:`liquid_vapor`
|
||||
* :class:`redlich_kwong`
|
||||
* :class:`ideal_interface`
|
||||
* :class:`edge`
|
||||
|
||||
These phase typese share many common features, however, and so we will begin by
|
||||
discussing those aspects common to all entries for phases. The :class:`phase`
|
||||
class contains the features common to all phase types.
|
||||
|
||||
Phase Attributes
|
||||
----------------
|
||||
|
||||
Phase Name
|
||||
^^^^^^^^^^
|
||||
|
||||
The ``name`` field is a string that identifies the phase. It must not contain
|
||||
any whitespace characters or reserved XML characters, and must be unique within
|
||||
the file among all phase definitions of any type.
|
||||
|
||||
Phases are referenced by name when importing them into an application program,
|
||||
or when defining an interface between phases.
|
||||
|
||||
Declaring the Elements
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The elements that may be present in the phase are declared in the elements
|
||||
field. This must be a string of element symbols separated by spaces. Each symbol
|
||||
must either match one listed in the database file ``elements.xml``, or else
|
||||
match the symbol of an element entry defined elsewhere in the input file (See
|
||||
:ref:`sec-elements`).
|
||||
|
||||
The ``elements.xml`` database contains most elements of the periodic table, with
|
||||
their natural-abundance atomic masses. It also contains a few isotopes (D, Tr),
|
||||
and an "element" for an electron (E). This pseudo-element can be used to specify
|
||||
the composition of charged species. Note that two-character symbols should have
|
||||
an uppercase first letter, and a lowercase second letter (e.g. ``Cu``, not ``CU``).
|
||||
|
||||
It should be noted that the order of the element symbols in the string
|
||||
determines the order in which they are stored internally by Cantera. For
|
||||
example, if a phase definition specifies the elements as::
|
||||
|
||||
ideal_gas(name = "gasmix",
|
||||
elements = "H C O N Ar",
|
||||
# ...
|
||||
)
|
||||
|
||||
then when this definition is imported by an application, element-specific
|
||||
properties will be ordered in the same way::
|
||||
|
||||
>>> import cantera as ct
|
||||
>>> gas = ct.Solution('example.cti', 'gasmix')
|
||||
>>> for n in range(gas.nElements()):
|
||||
... print n, gas.elementSymbol(n)
|
||||
0 H
|
||||
1 C
|
||||
2 O
|
||||
3 N
|
||||
4 Ar
|
||||
|
||||
For some calculations, such as multi-phase chemical equilibrium, it is important
|
||||
to synchronize the elements among multiple phases, so that each phase contains
|
||||
the same elements with the same ordering. In such cases, simply use the same
|
||||
string in the elements field for all phases.
|
||||
|
||||
.. _sec-defining-species:
|
||||
|
||||
Defining the Species
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The species in the phase are declared in the species field. They are not defined
|
||||
there, only declared. Species definitions may be imported from other files, or
|
||||
species may be defined locally using species entries elsewhere in the file.
|
||||
|
||||
If a single string of species symbols is given, then it is assumed that these
|
||||
are locally defined. For each one, a corresponding species entry must be present
|
||||
somewhere in the file, either preceding or following the phase entry. Note that
|
||||
the string may extend over multiple lines by delimiting it with triple quotes::
|
||||
|
||||
species = 'AR SI Si2 SiH SiH2 SiH3 SiH4'
|
||||
|
||||
# include all species defined in this file
|
||||
species = 'all'
|
||||
|
||||
# a multi-line species declaration
|
||||
species = """ H2 H O O2 OH H2O HO2 H2O2 C CH
|
||||
CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O
|
||||
CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH
|
||||
N NH NH2 NH3 NNH NO NO2 N2O HNO CN
|
||||
HCN H2CN HCNN HCNO HOCN HNCO NCO N2 AR C3H7
|
||||
C3H8 CH2CHO CH3CHO """
|
||||
|
||||
If the species are imported from another file, instead of being defined locally,
|
||||
then the string should begin with the file name (without extension), followed by
|
||||
a colon::
|
||||
|
||||
# import selected species from silicon.xml
|
||||
species = "silicon: SI SI2 SIH SIH2 SIH3 SIH4 SI2H6"
|
||||
|
||||
# import all species from silicon.xml
|
||||
species = "silicon: all"
|
||||
|
||||
In this case, the species definitions will be taken from file ``silicon.xml``,
|
||||
which must exist either in the local directory or somewhere on the Cantera
|
||||
search path.
|
||||
|
||||
It is also possible to import species from several sources, or mix local
|
||||
definitions with imported ones, by specifying a sequence of strings::
|
||||
|
||||
species = ["CL2 CL F F2 HF HCL", # defined in this file
|
||||
"air: O2 N2 NO", # imported from 'air.xml'
|
||||
"ions: CL- F-"] # imported from 'ions.xml'
|
||||
|
||||
Note that the strings must be separated by commas, and enclosed in square
|
||||
brackets or parentheses.
|
||||
|
||||
.. _sec-declaring-reactions:
|
||||
|
||||
Declaring the Reactions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The reactions among the species are declared in the ``reactions`` field. Just as
|
||||
with species, reactions may be defined locally in the file, or may be imported
|
||||
from one or more other files. All reactions must only involve species that have
|
||||
been declared for the phase.
|
||||
|
||||
Unlike species, reactions do not have a name, but do have an optional ``ID``
|
||||
field. If the ``ID`` field is not assigned a value, then when the reaction entry
|
||||
is read it will be assigned a four-digit string encoding the reaction number,
|
||||
beginning with ``'0001'`` for the first reaction in the file, and incrementing
|
||||
by one for each new reaction.
|
||||
|
||||
If all reactions defined locally in the input file are to be included in the
|
||||
phase definition, then assign the ``reactions`` field the string ``'all'``::
|
||||
|
||||
reactions = 'all'
|
||||
|
||||
If, on the other hand, only some of the reactions defined in the file are to be
|
||||
included, then a range can be specified using the reaction ``ID`` fields::
|
||||
|
||||
reactions = 'nox-12 to nox-24'
|
||||
|
||||
In determining which reactions to include, a lexical comparison of id strings is
|
||||
performed. This means, for example, that ``'nox-8'`` is greater than
|
||||
``'nox-24'``. (If it is rewritten ``'nox-08'``, however, then it would be lexically
|
||||
less than ``'nox-24'``.)
|
||||
|
||||
Just as described above for species, reactions can be imported from another
|
||||
file, and reactions may be imported from several sources. Examples::
|
||||
|
||||
# import all reactions defined in this file
|
||||
reactions = "all"
|
||||
|
||||
# import all reactions defined in rxns.xml
|
||||
reactions = "rxns: all"
|
||||
|
||||
# import reactions 1-14 in rxns.xml
|
||||
reactions = "rxns: 0001 to 0014"
|
||||
|
||||
# import reactions from several sources
|
||||
reactions = ["all", # all local reactions
|
||||
"gas: all", # all reactions in gas.xml
|
||||
"nox: n005 to n008"] # reactions 5 to 8 in nox.xml
|
||||
|
||||
The Kinetics Model
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A *kinetics model* is a set of equations to use to compute reaction rates. In
|
||||
most cases, each type of phase has an associated kinetics model that is used by
|
||||
default, and so the ``kinetics`` field does not need to be assigned a value. For
|
||||
example, the :class:`ideal_gas` entry has an associated kinetics model called
|
||||
``GasKinetics`` that implements mass-action kinetics, computes reverse rates
|
||||
from thermochemistry for reversible reactions, and provides various
|
||||
pressure-independent and pressure-dependent reaction types. Other models could
|
||||
be implemented, and this field would then be used to select the desired
|
||||
model. For now, the ``kinetics`` field can be safely ignored.
|
||||
|
||||
The Transport Model
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A *transport model* is a set of equations used to compute transport
|
||||
properties. For :class:`ideal_gas` phases, multiple transport models are
|
||||
available; the one desired can be selected by assigning a string to this
|
||||
field. See :ref:`sec-gas-transport-models` for more details.
|
||||
|
||||
The Initial State
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
The phase may be assigned an initial state to which it will be set when the
|
||||
definition is imported into an application and an object created. This is done
|
||||
by assigning field ``initial_state`` an embedded entry of type :class:`state`,
|
||||
described in :ref:`sec-state-entry`.
|
||||
|
||||
Most of the attributes defined here are "immutable," meaning that once the
|
||||
definition has been imported into an application, they cannot be changed by the
|
||||
application. For example, it is not possible to change the elements or the
|
||||
species. The temperature, pressure, and composition, however, are "mutable"---
|
||||
they can be changed. This is why the field defining the state is called the
|
||||
``initial_state``; the object in the application will be initially set to this
|
||||
state, but it may be changed at any time.
|
||||
|
||||
.. _sec-phase-options:
|
||||
|
||||
Special Processing Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The options field is used to indicate how certain conditions should be handled
|
||||
when importing the phase definition. The options field may be assigned a string
|
||||
or a sequence of strings from the table below.
|
||||
|
||||
================================== ========================================================
|
||||
Option String Meaning
|
||||
================================== ========================================================
|
||||
``'skip_undeclared_elements'`` When importing species, skip any containing undeclared
|
||||
elements, rather than flagging them as an error.
|
||||
``'skip_undeclared_species'`` When importing reactions, skip any containing undeclared
|
||||
species, rather than flagging them as an error.
|
||||
``'skip_undeclared_third_bodies'`` When importing reactions with third body efficiencies,
|
||||
ignore any efficiencies for undeclared species, rather
|
||||
than flagging them as an error.
|
||||
``'allow_discontinuous_thermo'`` Disable the automatic adjustment of NASA polynomials to
|
||||
eliminate discontinuities in enthalpy and entropy at the
|
||||
midpoint temperature.
|
||||
================================== ========================================================
|
||||
|
||||
Using the ``options`` field, it is possible to extract a sub-mechanism from a large
|
||||
reaction mechanism, as follows::
|
||||
|
||||
ideal_gas(name = 'hydrogen_mech',
|
||||
elements = 'H O',
|
||||
species = 'gri30:all',
|
||||
reactions = 'gri30:all',
|
||||
options = ('skip_undeclared_elements',
|
||||
'skip_undeclared_species',
|
||||
'skip_undeclared_third_bodies'))
|
||||
|
||||
If we import this into Matlab, for example, we get a gas mixture containing the
|
||||
8 species (out of 53 total) that contain only H and O:
|
||||
|
||||
.. code-block:: matlabsession
|
||||
|
||||
>> gas = Solution('gas.cti', 'hydrogen_mech')
|
||||
|
||||
hydrogen_mech:
|
||||
|
||||
temperature 0.001 K
|
||||
pressure 0.00412448 Pa
|
||||
density 0.001 kg/m^3
|
||||
mean mol. weight 2.01588 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy -3.786e+006 -7.632e+006 J
|
||||
internal energy -3.786e+006 -7.632e+006 J
|
||||
entropy 6210.88 1.252e+004 J/K
|
||||
Gibbs function -3.786e+006 -7.632e+006 J
|
||||
heat capacity c_p 9669.19 1.949e+004 J/K
|
||||
heat capacity c_v 5544.7 1.118e+004 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
H2 1 1 -917934
|
||||
[ +7 minor] 0 0
|
||||
|
||||
>> eqs = reactionEqn(gas)
|
||||
|
||||
eqs =
|
||||
|
||||
'2 O + M <=> O2 + M'
|
||||
'O + H + M <=> OH + M'
|
||||
'O + H2 <=> H + OH'
|
||||
'O + HO2 <=> OH + O2'
|
||||
'O + H2O2 <=> OH + HO2'
|
||||
'H + O2 + M <=> HO2 + M'
|
||||
'H + 2 O2 <=> HO2 + O2'
|
||||
'H + O2 + H2O <=> HO2 + H2O'
|
||||
'H + O2 <=> O + OH'
|
||||
'2 H + M <=> H2 + M'
|
||||
'2 H + H2 <=> 2 H2'
|
||||
'2 H + H2O <=> H2 + H2O'
|
||||
'H + OH + M <=> H2O + M'
|
||||
'H + HO2 <=> O + H2O'
|
||||
'H + HO2 <=> O2 + H2'
|
||||
'H + HO2 <=> 2 OH'
|
||||
'H + H2O2 <=> HO2 + H2'
|
||||
'H + H2O2 <=> OH + H2O'
|
||||
'OH + H2 <=> H + H2O'
|
||||
'2 OH (+ M) <=> H2O2 (+ M)'
|
||||
'2 OH <=> O + H2O'
|
||||
'OH + HO2 <=> O2 + H2O'
|
||||
'OH + H2O2 <=> HO2 + H2O'
|
||||
'OH + H2O2 <=> HO2 + H2O'
|
||||
'2 HO2 <=> O2 + H2O2'
|
||||
'2 HO2 <=> O2 + H2O2'
|
||||
'OH + HO2 <=> O2 + H2O'
|
||||
|
||||
Ideal Gas Mixtures
|
||||
------------------
|
||||
|
||||
Now we turn to the specific entry types for phases, beginning with
|
||||
:class:`ideal_gas`.
|
||||
|
||||
Many combustion and CVD simulations make use of reacting ideal gas
|
||||
mixtures. These can be defined using the :class:`ideal_gas` entry. The Cantera
|
||||
ideal gas model allows any number of species, and any number of reactions among
|
||||
them. It supports all of the options in the widely-used model described by Kee
|
||||
et al. [#Kee1989]_, plus some additional options for species thermodynamic
|
||||
properties and reaction rate expressions.
|
||||
|
||||
An example of an ``ideal_gas`` entry is shown below::
|
||||
|
||||
ideal_gas(name='air8',
|
||||
elements='N O Ar',
|
||||
species='gri30: N2 O2 N O NO NO2 N2O AR',
|
||||
reactions='all',
|
||||
transport='Mix',
|
||||
initial_state=state(temperature=500.0,
|
||||
pressure=(1.0, 'atm'),
|
||||
mole_fractions='N2:0.78, O2:0.21, AR:0.01'))
|
||||
|
||||
This entry defines an ideal gas mixture that contains 8 species, the definitions
|
||||
of which are imported from dataset gri30 (file ``gri30.xml``). All reactions
|
||||
defined in the file are to be included, transport properties are to be computed
|
||||
using mixture rules, and the state of the gas is to be set initially to 500 K, 1
|
||||
atm, and a composition that corresponds to air.
|
||||
|
||||
.. _sec-gas-transport-models:
|
||||
|
||||
Transport Models
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
Two transport models are available for use with ideal gas mixtures. The first is
|
||||
a multicomponent transport model that is based on the model described by
|
||||
Dixon-Lewis [#dl68]_ (see also Kee et al. [#Kee2003]_). The second is a model that uses
|
||||
mixture rules. To select the multicomponent model, set the transport field to
|
||||
the string ``'Multi'``, and to select the mixture-averaged model, set it to the
|
||||
string ``'Mix'``::
|
||||
|
||||
ideal_gas(name="gas1",
|
||||
# ...
|
||||
transport="Multi", # use multicomponent formulation
|
||||
# ...
|
||||
)
|
||||
|
||||
ideal_gas(name="gas2",
|
||||
# ...
|
||||
transport="Mix", # use mixture-averaged formulation
|
||||
# ...
|
||||
)
|
||||
|
||||
Stoichiometric Solid
|
||||
--------------------
|
||||
|
||||
A :class:`stoichiometric_solid` is one that is modeled as having a precise,
|
||||
fixed composition, given by the composition of the one species present. A
|
||||
stoichiometric solid can be used to define a condensed phase that can
|
||||
participate in heterogeneous reactions. (Of course, there cannot be homogeneous
|
||||
reactions, since the composition is fixed.) ::
|
||||
|
||||
stoichiometric_solid(name='graphite',
|
||||
elements='C',
|
||||
species='C(gr)',
|
||||
density=(2.2, 'g/cm3'),
|
||||
initial_state=state(temperature=300.0,
|
||||
pressure=(1.0, 'atm')))
|
||||
|
||||
In the example above, the definition of the species ``'C(gr)'`` must appear
|
||||
elsewhere in the input file.
|
||||
|
||||
Stoichiometric Liquid
|
||||
---------------------
|
||||
|
||||
A stoichiometric liquid differs from a stoichiometric solid in only one respect:
|
||||
the transport manager computes the viscosity as well as the thermal
|
||||
conductivity.
|
||||
|
||||
.. _sec-interfaces:
|
||||
|
||||
Interfaces
|
||||
==========
|
||||
|
||||
Now that we have seen how to define bulk, three-dimensional phases, we can
|
||||
describe the procedure to define an interface between phases.
|
||||
|
||||
Cantera presently implements a simple model for an interface that treats it as a
|
||||
two-dimensional ideal solution of interfacial species. There is a fixed site
|
||||
density :math:`n^0`, and each site may be occupied by one of several adsorbates,
|
||||
or may be empty. The chemical potential of each species is computed using the
|
||||
expression for an ideal solution:
|
||||
|
||||
.. math::
|
||||
|
||||
\mu_k = \mu^0_k + \hat{R}T \log \theta_k,
|
||||
|
||||
where :math:`\theta_k` is the coverage of species :math:`k` on the surface. The
|
||||
coverage is related to the surface concentration :math:`C_k` by
|
||||
|
||||
.. math::
|
||||
|
||||
\theta_k = \frac{C_k n_k}{n^0} ,
|
||||
|
||||
where :math:`n_k` is the number of sites covered or blocked by species
|
||||
:math:`k`.
|
||||
|
||||
The entry type for this interface model is
|
||||
:class:`ideal_interface`. (Additional interface models may be added to allow
|
||||
non-ideal, coverage-dependent properties.)
|
||||
|
||||
Defining an interface is much like defining a phase. There are two new fields:
|
||||
``phases`` and ``site_density``. The ``phases`` field specifies the bulk phases that
|
||||
participate in the heterogeneous reactions. Although in most cases this string
|
||||
will list one or two phases, no limit is placed on the number. This is
|
||||
particularly useful in some electrochemical problems, where reactions take place
|
||||
near the triple-phase boundary where a gas, an electrolyte, and a metal all meet.
|
||||
|
||||
The ``site_density`` field is the number of adsorption sites per unit area.
|
||||
|
||||
Another new aspect is in the embedded :class:`state` entry in the
|
||||
``initial_state`` field. When specifying the initial state of an interface, the
|
||||
:class:`state` entry has a field *coverages*, which can be assigned a string
|
||||
specifying the initial surface species coverages::
|
||||
|
||||
ideal_interface(name='silicon_surface',
|
||||
elements='Si H',
|
||||
species='s* s-SiH3 s-H',
|
||||
reactions='all',
|
||||
phases='gas bulk-Si',
|
||||
site_density=(1.0e15, 'molec/cm2'),
|
||||
initial_state=state(temperature=1200.0,
|
||||
coverages='s-H:1'))
|
||||
|
||||
.. _sec-state-entry:
|
||||
|
||||
The :class:`state` entry
|
||||
========================
|
||||
|
||||
The initial state of either a phase or an interface may be set using an embedded
|
||||
:class:`state` entry. Note that only one of (``pressure``, ``density``) may be
|
||||
specified, and only one of (``mole_fractions``, ``mass_fractions``, ``coverages``).
|
||||
|
||||
.. rubric:: References
|
||||
|
||||
.. [#Kee1989] R. J. Kee, F. M. Rupley, and J. A. Miller. Chemkin-II: A Fortran
|
||||
chemical kinetics package for the analysis of gasphase chemical
|
||||
kinetics. Technical Report SAND89-8009, Sandia National Laboratories, 1989.
|
||||
|
||||
.. [#dl68] G. Dixon-Lewis. Flame structure and flame reaction kinetics,
|
||||
II: Transport phenomena in multicomponent systems. *Proc. Roy. Soc. A*,
|
||||
307:111--135, 1968.
|
||||
|
||||
.. [#Kee2003] R. J. Kee, M. E. Coltrin, and P. Glarborg. *Chemically Reacting
|
||||
Flow: Theory and Practice*. John Wiley and Sons, 2003.
|
||||
|
|
@ -1,557 +0,0 @@
|
|||
.. py:currentmodule:: cantera.ctml_writer
|
||||
|
||||
.. _sec-reactions:
|
||||
|
||||
*********
|
||||
Reactions
|
||||
*********
|
||||
|
||||
Cantera supports a number of different types of reactions, including several
|
||||
types of homogeneous reactions, surface reactions, and electrochemical
|
||||
reactions. For each, there is a corresponding entry type. The simplest entry
|
||||
type is :class:`reaction`, which can be used for any homogeneous reaction that
|
||||
has a rate expression that obeys the law of mass action, with a rate coefficient
|
||||
that depends only on temperature.
|
||||
|
||||
Common Attributes
|
||||
=================
|
||||
|
||||
All of the entry types that define reactions share some common features. These
|
||||
are described first, followed by descriptions of the individual reaction types
|
||||
in the following sections.
|
||||
|
||||
The Reaction Equation
|
||||
---------------------
|
||||
|
||||
The reaction equation determines the reactant and product stoichiometry. A
|
||||
relatively simple parsing strategy is currently used, which assumes that all
|
||||
coefficient and species symbols on either side of the equation are delimited by
|
||||
spaces::
|
||||
|
||||
2 CH2 <=> CH + CH3 # OK
|
||||
2 CH2<=>CH + CH3 # OK
|
||||
2CH2 <=> CH + CH3 # error
|
||||
CH2 + CH2 <=> CH + CH3 # OK
|
||||
2 CH2 <=> CH+CH3 # error
|
||||
|
||||
The incorrect versions here would generate "undeclared species" errors and would
|
||||
halt processing of the input file. In the first case, the error would be that
|
||||
the species ``2CH2`` is undeclared, and in the second case it would be species
|
||||
``CH+CH3``.
|
||||
|
||||
Whether the reaction is reversible or not is determined by the form of the
|
||||
equality sign in the reaction equation. If either ``<=>`` or ``=`` is found,
|
||||
then the reaction is regarded as reversible, and the reverse rate will be
|
||||
computed from detailed balance. If, on the other hand, ``=>`` is found, the
|
||||
reaction will be treated as irreversible.
|
||||
|
||||
The rate coefficient is specified with an embedded entry corresponding to the
|
||||
rate coefficient type. At present, the only implemented type is the modified
|
||||
Arrhenius function
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T) = A T^b \exp(-E/\hat{R}T)
|
||||
|
||||
which is defined with an :class:`Arrhenius` entry::
|
||||
|
||||
rate_coeff = Arrhenius(A=1.0e13, b=0, E=(7.3, 'kcal/mol'))
|
||||
rate_coeff = Arrhenius(1.0e13, 0, (7.3, 'kcal/mol'))
|
||||
|
||||
As a shorthand, if the ``rate_coeff`` field is assigned a sequence of three numbers, these are assumed to be :math:`(A, b, E)` in the modified Arrhenius function::
|
||||
|
||||
rate_coeff = [1.0e13, 0, (7.3, 'kcal/mol')] # equivalent to above
|
||||
|
||||
The units of the pre-exponential factor *A* can be specified explicitly if
|
||||
desired. If not specified, they will be constructed using the *quantity*, *length*,
|
||||
and *time* units specified in the units directive. Since the units of *A* depend on
|
||||
the reaction order, the units of each reactant concentration (different for bulk
|
||||
species in solution, surface species, and pure condensed-phase species), and the
|
||||
units of the rate of progress (different for homogeneous and heterogeneous
|
||||
reactions), it is usually best not to specify units for *A*, in which case they
|
||||
will be computed taking all of these factors into account.
|
||||
|
||||
Note: if :math:`b \ne 0`, then the term :math:`T^b` should have units of
|
||||
:math:`K^b`, which would change the units of *A*. This is not done, however, so
|
||||
the units associated with A are really the units for :math:`k_f` . One way to
|
||||
formally express this is to replace :math:`T^b` by the non-dimensional quantity
|
||||
:math:`[T/(1 K)]^b`.
|
||||
|
||||
The ID String
|
||||
-------------
|
||||
|
||||
An optional identifying string can be entered in the ``ID`` field, which can
|
||||
then be used in the ``reactions`` field of a :class:`phase` or interface entry
|
||||
to identify this reaction. If omitted, the reactions are assigned ID strings as
|
||||
they are read in, beginning with ``'0001'``, ``'0002'``, etc.
|
||||
|
||||
Note that the ID string is only used when selectively importing reactions. If
|
||||
all reactions in the local file or in an external one are imported into a phase
|
||||
or interface, then the reaction ``ID`` field is not used.
|
||||
|
||||
.. _sec-reaction-options:
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
Certain conditions are normally flagged as errors by Cantera. In some cases,
|
||||
they may not be errors, and the options field can be used to specify how they
|
||||
should be handled.
|
||||
|
||||
``skip``
|
||||
The ``'skip'`` option can be used to temporarily remove this reaction from
|
||||
the phase or interface that imports it, just as if the reaction entry were
|
||||
commented out. The advantage of using skip instead of commenting it out is
|
||||
that a warning message is printed each time a phase or interface definition
|
||||
tries to import it. This serves as a reminder that this reaction is not
|
||||
included, which can easily be forgotten when a reaction is "temporarily"
|
||||
commented out of an input file.
|
||||
|
||||
``duplicate``
|
||||
Normally, when a reaction is imported into a phase, it is checked to see
|
||||
that it is not a duplicate of another reaction already present in the phase,
|
||||
and an error results if a duplicate is found. But in some cases, it may be
|
||||
appropriate to include duplicate reactions, for example if a reaction can
|
||||
proceed through two distinctly different pathways, each with its own rate
|
||||
expression. Another case where duplicate reactions can be used is if it is
|
||||
desired to implement a reaction rate coefficient of the form:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T) = \sum_{n=1}^{N} A_n T^{b_n} exp(-E_n/\hat{R}T)
|
||||
|
||||
While Cantera does not provide such a form for reaction rates, it can be
|
||||
implemented by defining *N* duplicate reactions, and assigning one rate
|
||||
coefficient in the sum to each reaction. If the ``'duplicate'`` option is
|
||||
specified, then the reaction not only *may* have a duplicate, it *must*. Any
|
||||
reaction that specifies that it is a duplicate, but cannot be paired with
|
||||
another reaction in the phase that qualifies as its duplicate generates an
|
||||
error.
|
||||
|
||||
``negative_A``
|
||||
If some of the terms in the above sum have negative :math:`A_n`, this scheme
|
||||
fails, since Cantera normally does not allow negative pre-exponential
|
||||
factors. But if there are duplicate reactions such that the total rate is
|
||||
positive, then negative *A* parameters are acceptable, as long as the
|
||||
``'negative_A'`` option is specified.
|
||||
|
||||
``negative_orders``
|
||||
Reaction orders are normally required to be non-negative, since negative
|
||||
orders are non-physical and undefined at zero concentration. Cantera allows
|
||||
negative orders for a global reaction only if the ``negative_orders``
|
||||
override option is specified for the reaction.
|
||||
|
||||
|
||||
Reactions with Pressure-Independent Rate
|
||||
========================================
|
||||
|
||||
The :class:`reaction` entry is used to represent homogeneous reactions with
|
||||
pressure-independent rate coefficients and mass action kinetics. Examples of
|
||||
reaction entries that implement some reactions in the GRI-Mech 3.0 natural gas
|
||||
combustion mechanism [#Smith1997]_ are shown below::
|
||||
|
||||
units(length = 'cm', quantity = 'mol', act_energy = 'cal/mol')
|
||||
...
|
||||
reaction( "O + H2 <=> H + OH", [3.87000E+04, 2.7, 6260])
|
||||
reaction( "O + HO2 <=> OH + O2", [2.00000E+13, 0.0, 0])
|
||||
reaction( "O + H2O2 <=> OH + HO2", [9.63000E+06, 2.0, 4000])
|
||||
reaction( "O + HCCO <=> H + 2 CO", [1.00000E+14, 0.0, 0])
|
||||
reaction( "H + O2 + AR <=> HO2 + AR", kf=Arrhenius(A=7.00000E+17, b=-0.8, E=0))
|
||||
reaction( equation = "HO2 + C3H7 <=> O2 + C3H8", kf=Arrhenius(2.55000E+10, 0.255, -943))
|
||||
reaction( equation = "HO2 + C3H7 => OH + C2H5 + CH2O", kf=[2.41000E+13, 0.0, 0])
|
||||
|
||||
Three-Body Reactions
|
||||
====================
|
||||
|
||||
A three-body reaction is a gas-phase reaction of the form:
|
||||
|
||||
.. math::
|
||||
|
||||
{\rm A + B + M} \rightleftharpoons {\rm AB + M}
|
||||
|
||||
Here *M* is an unspecified collision partner that carries away excess energy to
|
||||
stabilize the *AB* molecule (forward direction) or supplies energy to break the *AB*
|
||||
bond (reverse direction).
|
||||
|
||||
Different species may be more or less effective in acting as the collision partner. A species that is much lighter than
|
||||
*A* and *B* may not be able to transfer much of its kinetic energy, and so would be inefficient as a collision partner. On
|
||||
the other hand, a species with a transition from its ground state that is nearly resonant with one in the *AB** activated
|
||||
complex may be much more effective at exchanging energy than would otherwise be expected.
|
||||
|
||||
These effects can be accounted for by defining a collision efficiency
|
||||
:math:`\epsilon` for each species, defined such that the forward reaction rate is
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T)[A][B][M]
|
||||
|
||||
where
|
||||
|
||||
.. math::
|
||||
|
||||
[M] = \sum_k \epsilon_k C_k
|
||||
|
||||
where :math:`C_k` is the concentration of species *k*. Since any constant
|
||||
collision efficiency can be absorbed into the rate coefficient :math:`k_f(T)`, the
|
||||
default collision efficiency is 1.0.
|
||||
|
||||
A three-body reaction may be defined using the :class:`three_body_reaction` entry. The equation string for a three-body
|
||||
reaction must contain an ``'M'`` or ``'m'`` on both the reactant and product sides of the equation. The collision
|
||||
efficiencies are specified as a string, with the species name followed by a colon and the efficiency.
|
||||
|
||||
Some examples from GRI-Mech 3.0 are shown below::
|
||||
|
||||
three_body_reaction( "2 O + M <=> O2 + M", [1.20000E+17, -1, 0],
|
||||
" AR:0.83 C2H6:3 CH4:2 CO:1.75 CO2:3.6 H2:2.4 H2O:15.4 ")
|
||||
|
||||
three_body_reaction( "O + H + M <=> OH + M", [5.00000E+17, -1, 0],
|
||||
efficiencies = " AR:0.7 C2H6:3 CH4:2 CO:1.5 CO2:2 H2:2 H2O:6 ")
|
||||
|
||||
three_body_reaction(
|
||||
equation = "H + OH + M <=> H2O + M",
|
||||
rate_coeff = [2.20000E+22, -2, 0],
|
||||
efficiencies = " AR:0.38 C2H6:3 CH4:2 H2:0.73 H2O:3.65 "
|
||||
)
|
||||
|
||||
As always, the field names are optional *if* the field values are entered in the
|
||||
declaration order.
|
||||
|
||||
Falloff Reactions
|
||||
=================
|
||||
|
||||
A *falloff reaction* is one that has a rate that is first-order in [M] at low
|
||||
pressure, like a three-body reaction, but becomes zero-order in [M] as [M]
|
||||
increases. Dissociation / association reactions of polyatomic molecules often
|
||||
exhibit this behavior.
|
||||
|
||||
The simplest expression for the rate coefficient for a falloff reaction is the
|
||||
Lindemann form [#Lindemann1922]_:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T, [{\rm M}]) = \frac{k_0[{\rm M}]}{1 + \frac{k_0{\rm [M]}}{k_\infty}}
|
||||
|
||||
In the low-pressure limit, this approaches :math:`k0{\rm [M]}`, and in the
|
||||
high-pressure limit it approaches :math:`k_\infty`.
|
||||
|
||||
Defining the non-dimensional reduced pressure:
|
||||
|
||||
.. math::
|
||||
|
||||
P_r = \frac{k_0 {\rm [M]}}{k_\infty}
|
||||
|
||||
The rate constant may be written as
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T, P_r) = k_\infty \left(\frac{P_r}{1 + P_r}\right)
|
||||
|
||||
More accurate models for unimolecular processes lead to other, more complex,
|
||||
forms for the dependence on reduced pressure. These can be accounted for by
|
||||
multiplying the Lindemann expression by a function :math:`F(T, P_r)`:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T, P_r) = k_\infty \left(\frac{P_r}{1 + P_r}\right) F(T, P_r)
|
||||
|
||||
This expression is used to compute the rate coefficient for falloff
|
||||
reactions. The function :math:`F(T, P_r)` is the *falloff function*, and is
|
||||
specified by assigning an embedded entry to the ``falloff`` field.
|
||||
|
||||
The Troe Falloff Function
|
||||
-------------------------
|
||||
|
||||
A widely-used falloff function is the one proposed by Gilbert et
|
||||
al. [#Gilbert1983]_:
|
||||
|
||||
.. math::
|
||||
|
||||
\log_{10} F(T, P_r) = \frac{\log_{10} F_{cent}(T)}{1 + f_1^2}
|
||||
|
||||
F_{cent}(T) = (1-A) \exp(-T/T_3) + A \exp (-T/T_1) + \exp(-T_2/T)
|
||||
|
||||
f_1 = (\log_{10} P_r + C) / (N - 0.14 (\log_{10} P_r + C))
|
||||
|
||||
C = -0.4 - 0.67\; \log_{10} F_{cent}
|
||||
|
||||
N = 0.75 - 1.27\; \log_{10} F_{cent}
|
||||
|
||||
The :class:`Troe` directive requires specifying the first three parameters
|
||||
:math:`(A, T_3, T_1)`. The fourth parameter, :math:`T_2`, is optional, defaulting to 0.0.
|
||||
|
||||
.. _sec-sri-falloff:
|
||||
|
||||
The SRI Falloff Function
|
||||
------------------------
|
||||
|
||||
This falloff function is based on the one originally due to Stewart et
|
||||
al. [#Stewart1989]_, which required three parameters :math:`(a, b, c)`. Kee et
|
||||
al. [#Kee1989]_ generalized this function slightly by adding two more parameters
|
||||
:math:`(d, e)`. (The original form corresponds to :math:`d = 1, e = 0`.) Cantera
|
||||
supports the extended 5-parameter form, given by:
|
||||
|
||||
.. math::
|
||||
|
||||
F(T, P_r) = d \bigl[a \exp(-b/T) + \exp(-T/c)\bigr]^{1/(1+\log_{10}^2 P_r )} T^e
|
||||
|
||||
In keeping with the nomenclature of Kee et al. [#Kee1989]_, we will refer to this as
|
||||
the "SRI" falloff function. It is implemented by the :class:`SRI` directive.
|
||||
|
||||
.. :: NOTE: "definingphases.pdf" contains documentation for the Wang-Frenklach falloff
|
||||
function, which has a C++ implementation, but doesn't appear to be implemented
|
||||
in the CTI or CTML parsers.
|
||||
|
||||
Chemically-Activated Reactions
|
||||
==============================
|
||||
|
||||
For these reactions, the rate falls off as the pressure increases, due to
|
||||
collisional stabilization of a reaction intermediate. Example:
|
||||
|
||||
.. math::
|
||||
\mathrm{Si + SiH_4 (+M) \leftrightarrow Si_2H_2 + H_2 (+M)}
|
||||
|
||||
which competes with:
|
||||
|
||||
.. math::
|
||||
\mathrm{Si + SiH_4 (+M) \leftrightarrow Si_2H_4 (+M)}
|
||||
|
||||
Like falloff reactions, chemically-activated reactions are described by
|
||||
blending between a "low pressure" and a "high pressure" rate expression. The
|
||||
difference is that the forward rate constant is written as being proportional
|
||||
to the *low pressure* rate constant:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f(T, P_r) = k_0 \left(\frac{1}{1 + P_r}\right) F(T, P_r)
|
||||
|
||||
and the optional blending function *F* may described by any of the
|
||||
parameterizations allowed for falloff reactions. Chemically-activated
|
||||
reactions can be defined using the :class:`chemically_activated_reaction`
|
||||
directive.
|
||||
|
||||
An example of a reaction specified with this parameterization::
|
||||
|
||||
chemically_activated_reaction('CH3 + OH (+ M) <=> CH2O + H2 (+ M)',
|
||||
kLow=[2.823201e+02, 1.46878, (-3270.56495, 'cal/mol')],
|
||||
kHigh=[5.880000e-14, 6.721, (-3022.227, 'cal/mol')],
|
||||
falloff=Troe(A=1.671, T3=434.782, T1=2934.21, T2=3919.0))
|
||||
|
||||
In this example, the units of :math:`k_0` (`kLow`) are m^3/kmol/s and the
|
||||
units of :math:`k_\infty` (`kHigh`) are 1/s.
|
||||
|
||||
Pressure-Dependent Arrhenius Rate Expressions (P-Log)
|
||||
=====================================================
|
||||
|
||||
The :class:`pdep_arrhenius` class represents pressure-dependent reaction rates
|
||||
by logarithmically interpolating between Arrhenius rate expressions at various
|
||||
pressures. Given two rate expressions at two specific pressures:
|
||||
|
||||
.. math::
|
||||
|
||||
P_1: k_1(T) = A_1 T^{b_1} e^{E_1 / RT}
|
||||
|
||||
P_2: k_2(T) = A_2 T^{b_2} e^{E_2 / RT}
|
||||
|
||||
The rate at an intermediate pressure :math:`P_1 < P < P_2` is computed as
|
||||
|
||||
.. math::
|
||||
|
||||
\log k(T,P) = \log k_1(T) + \bigl(\log k_2(T) - \log k_1(T)\bigr)
|
||||
\frac{\log P - \log P_1}{\log P_2 - \log P_1}
|
||||
|
||||
Multiple rate expressions may be given at the same pressure, in which case the
|
||||
rate used in the interpolation formula is the sum of all the rates given at that
|
||||
pressure. For pressures outside the given range, the rate expression at the nearest
|
||||
pressure is used.
|
||||
|
||||
An example of a reaction specified in this format::
|
||||
|
||||
pdep_arrhenius('R1 + R2 <=> P1 + P2',
|
||||
[(0.001315789, 'atm'), 2.440000e+10, 1.04, 3980.0],
|
||||
[(0.039473684, 'atm'), 3.890000e+10, 0.989, 4114.0],
|
||||
[(1.0, 'atm'), 3.460000e+12, 0.442, 5463.0],
|
||||
[(10.0, 'atm'), 1.720000e+14, -0.01, 7134.0],
|
||||
[(100.0, 'atm'), -7.410000e+30, -5.54, 12108.0],
|
||||
[(100.0, 'atm'), 1.900000e+15, -0.29, 8306.0])
|
||||
|
||||
The first argument is the reaction equation. Each subsequent argument is a
|
||||
sequence of four elements specifying a pressure and the Arrhenius parameters at
|
||||
that pressure.
|
||||
|
||||
Chebyshev Reaction Rate Expressions
|
||||
===================================
|
||||
|
||||
Class :class:`chebyshev_reaction` represents a phenomenological rate coefficient
|
||||
:math:`k(T,P)` in terms of a bivariate Chebyshev polynomial. The rate constant
|
||||
can be written as:
|
||||
|
||||
.. math:: \log k(T,P) = \sum_{t=1}^{N_T} \sum_{p=1}^{N_P} \alpha_{tp}
|
||||
\phi_t(\tilde{T}) \phi_p(\tilde{P})
|
||||
|
||||
where :math:`\alpha_{tp}` are the constants defining the rate, :math:`\phi_n(x)`
|
||||
is the Chebyshev polynomial of the first kind of degree :math:`n` evaluated at
|
||||
:math:`x`, and
|
||||
|
||||
.. math::
|
||||
|
||||
\tilde{T} \equiv \frac{2T^{-1} - T_\mathrm{min}^{-1} - T_\mathrm{max}^{-1}}
|
||||
{T_\mathrm{max}^{-1} - T_\mathrm{min}^{-1}}
|
||||
|
||||
\tilde{P} \equiv \frac{2 \log P - \log P_\mathrm{min} - \log P_\mathrm{max}}
|
||||
{\log P_\mathrm{max} - \log P_\mathrm{min}}
|
||||
|
||||
are reduced temperature and reduced pressures which map the ranges
|
||||
:math:`(T_\mathrm{min}, T_\mathrm{max})` and :math:`(P_\mathrm{min},
|
||||
P_\mathrm{max})` to :math:`(-1, 1)`.
|
||||
|
||||
A Chebyshev rate expression is specified in terms of the coefficient matrix
|
||||
:math:`\alpha` and the temperature and pressure ranges. An example of a
|
||||
Chebyshev rate expression where :math:`N_T = 6` and :math:`N_P = 4` is::
|
||||
|
||||
chebyshev_reaction('R1 + R2 <=> P1 + P2',
|
||||
Tmin=290.0, Tmax=3000.0,
|
||||
Pmin=(0.001, 'atm'), Pmax=(100.0, 'atm'),
|
||||
coeffs=[[-1.44280e+01, 2.59970e-01, -2.24320e-02, -2.78700e-03],
|
||||
[ 2.20630e+01, 4.88090e-01, -3.96430e-02, -5.48110e-03],
|
||||
[-2.32940e-01, 4.01900e-01, -2.60730e-02, -5.04860e-03],
|
||||
[-2.93660e-01, 2.85680e-01, -9.33730e-03, -4.01020e-03],
|
||||
[-2.26210e-01, 1.69190e-01, 4.85810e-03, -2.38030e-03],
|
||||
[-1.43220e-01, 7.71110e-02, 1.27080e-02, -6.41540e-04]])
|
||||
|
||||
Note that the Chebyshev polynomials are not defined outside the interval
|
||||
:math:`(-1,1)`, and therefore extrapolation of rates outside the range of
|
||||
temperatures and pressure for which they are defined is strongly discouraged.
|
||||
|
||||
Surface Reactions
|
||||
=================
|
||||
|
||||
Heterogeneous reactions on surfaces are represented by an extended Arrhenius-
|
||||
like rate expression, which combines the modified Arrhenius rate expression with
|
||||
further corrections dependent on the fractional surface coverages
|
||||
:math:`\theta_k` of one or more surface species. The forward rate constant for a
|
||||
reaction of this type is:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f = A T^b \exp \left( - \frac{E_a}{RT} \right)
|
||||
\prod_k 10^{a_k \theta_k} \theta_k^{m_k}
|
||||
\exp \left( \frac{- E_k \theta_k}{RT} \right)
|
||||
|
||||
where :math:`A`, :math:`b`, and :math:`E_a` are the modified Arrhenius
|
||||
parameters and :math:`a_k`, :math:`m_k`, and :math:`E_k` are the coverage
|
||||
dependencies from species *k*. A reaction of this form with a single coverage
|
||||
dependency (on the species ``H(S)``) can be written using class
|
||||
:class:`surface_reaction` with the ``coverage`` keyword argument supplied to the
|
||||
class :class:`Arrhenius`::
|
||||
|
||||
surface_reaction("2 H(S) => H2 + 2 PT(S)",
|
||||
Arrhenius(A, b, E_a,
|
||||
coverage=['H(S)', a_1, m_1, E_1]))
|
||||
|
||||
For a reaction with multiple coverage dependencies, the following syntax is
|
||||
used::
|
||||
|
||||
surface_reaction("2 H(S) => H2 + 2 PT(S)",
|
||||
Arrhenius(A, b, E_a,
|
||||
coverage=[['H(S)', a_1, m_1, E_1],
|
||||
['PT(S)', a_2, m_2, E_2]]))
|
||||
|
||||
Sticking Coefficients
|
||||
---------------------
|
||||
|
||||
Collisions between gas-phase molecules and surfaces which result in the gas-
|
||||
phase molecule sticking to the surface can be described as a reaction which is
|
||||
parameterized by a sticking coefficient:
|
||||
|
||||
.. math::
|
||||
|
||||
\gamma = a T^b e^{-c/RT}
|
||||
|
||||
where :math:`a`, :math:`b`, and :math:`c` are constants specific to the
|
||||
reaction. The values of these constants must be specified so that the sticking
|
||||
coefficient :math:`\gamma` is between 0 and 1 for all temperatures.
|
||||
|
||||
The sticking coefficient is related to the forward rate constant by the
|
||||
formula:
|
||||
|
||||
.. math::
|
||||
|
||||
k_f = \frac{\gamma}{\Gamma_\mathrm{tot}^m} \sqrt{\frac{RT}{2 \pi W}}
|
||||
|
||||
where :math:`\Gamma_\mathrm{tot}` is the total molar site density, :math:`m` is
|
||||
the sum of all the surface reactant stoichiometric coefficients, and :math:`W`
|
||||
is the molecular weight of the gas phase species.
|
||||
|
||||
A reaction of this form can be written as::
|
||||
|
||||
surface_reaction("H2O + PT(S) => H2O(S)", stick(a, b, c))
|
||||
|
||||
|
||||
Additional Options
|
||||
==================
|
||||
|
||||
Reaction Orders
|
||||
---------------
|
||||
|
||||
Explicit reaction orders different from the stoichiometric coefficients are
|
||||
sometimes used for non-elementary reactions. For example, consider the global
|
||||
reaction:
|
||||
|
||||
.. math::
|
||||
\mathrm{C_8H_{18} + 12.5 O_2 \rightarrow 8 CO_2 + 9 H_2O}
|
||||
|
||||
the forward rate constant might be given as [#Westbrook1981]_:
|
||||
|
||||
.. math::
|
||||
k_f = 4.6 \times 10^{11} [\mathrm{C_8H_{18}}]^{0.25} [\mathrm{O_2}]^{1.5}
|
||||
\exp\left(\frac{30.0\,\mathrm{kcal/mol}}{RT}\right)
|
||||
|
||||
This reaction could be defined as::
|
||||
|
||||
reaction("C8H18 + 12.5 O2 => 8 CO2 + 9 H2O", [4.6e11, 0.0, 30.0],
|
||||
order="C8H18:0.25 O2:1.5")
|
||||
|
||||
Special care is required in this case since the units of the pre-exponential
|
||||
factor depend on the sum of the reaction orders, which may not be an integer.
|
||||
|
||||
Note that you can change reaction orders only for irreversible reactions.
|
||||
|
||||
Normally, reaction orders are required to be positive. However, in some cases
|
||||
negative reaction orders are found to be better fits for experimental data. In
|
||||
these cases, the default behavior may be overridden by adding
|
||||
``negative_orders`` to the reaction options, e.g.::
|
||||
|
||||
reaction("C8H18 + 12.5 O2 => 8 CO2 + 9 H2O", [4.6e11, 0.0, 30.0],
|
||||
order="C8H18:-0.25 O2:1.75", options=['negative_orders'])
|
||||
|
||||
Some global reactions could have reactions orders for non-reactant species. One
|
||||
should add ``nonreactant_orders`` to the reaction options to use this feature::
|
||||
|
||||
reaction("C8H18 + 12.5 O2 => 8 CO2 + 9 H2O", [4.6e11, 0.0, 30.0],
|
||||
order="C8H18:-0.25 CO:0.15",
|
||||
options=['negative_orders', 'nonreactant_orders'])
|
||||
|
||||
|
||||
.. rubric:: References
|
||||
|
||||
.. [#Gilbert1983] R. G. Gilbert, K. Luther, and
|
||||
J. Troe. *Ber. Bunsenges. Phys. Chem.*, 87:169, 1983.
|
||||
|
||||
.. [#Lindemann1922] F. Lindemann. *Trans. Faraday Soc.*, 17:598, 1922.
|
||||
|
||||
.. [#Smith1997] Gregory P. Smith, David M. Golden, Michael Frenklach, Nigel
|
||||
W. Moriarty, Boris Eiteneer, Mikhail Goldenberg, C. Thomas Bowman, Ronald
|
||||
K. Hanson, Soonho Song, William C. Gardiner, Jr., Vitali V. Lissianski, , and
|
||||
Zhiwei Qin. GRI-Mech version 3.0, 1997. see
|
||||
http://www.me.berkeley.edu/gri_mech.
|
||||
|
||||
.. [#Stewart1989] P. H. Stewart, C. W. Larson, and D. Golden.
|
||||
*Combustion and Flame*, 75:25, 1989.
|
||||
|
||||
.. [#Kee1989] R. J. Kee, F. M. Rupley, and J. A. Miller. Chemkin-II: A Fortran
|
||||
chemical kinetics package for the analysis of gas-phase chemical
|
||||
kinetics. Technical Report SAND89-8009, Sandia National Laboratories, 1989.
|
||||
|
||||
.. [#Westbrook1981] C. K. Westbrook and F. L. Dryer. Simplified reaction
|
||||
mechanisms for the oxidation of hydrocarbon fuels in flames. *Combustion
|
||||
Science and Technology* **27**, pp. 31--43. 1981.
|
||||
|
|
@ -1,340 +0,0 @@
|
|||
.. py:currentmodule:: cantera.ctml_writer
|
||||
|
||||
.. _sec-species:
|
||||
|
||||
********************
|
||||
Elements and Species
|
||||
********************
|
||||
|
||||
.. _sec-elements:
|
||||
|
||||
Elements
|
||||
========
|
||||
|
||||
The :class:`element` entry defines an element or an isotope of an element. Note that
|
||||
these entries are not often needed, since the the database file ``elements.xml``
|
||||
is searched for element definitions when importing phase and interface
|
||||
definitions. An explicit element entry is needed only if an isotope not in
|
||||
``elements.xml`` is required::
|
||||
|
||||
element(symbol='C-13',
|
||||
atomic_mass=13.003354826)
|
||||
element("O-18", 17.9991603)
|
||||
|
||||
Species
|
||||
=======
|
||||
|
||||
For each species, a :class:`species` entry is required. Species are defined at
|
||||
the top-level of the input file---their definitions are not embedded in a phase
|
||||
or interface entry.
|
||||
|
||||
Species Name
|
||||
------------
|
||||
|
||||
The name field may contain embedded parentheses, ``+`` or ``-`` signs to
|
||||
indicate the charge, or just about anything else that is printable and not a
|
||||
reserved character in XML. Some example name specifications::
|
||||
|
||||
name = 'CH4'
|
||||
name = 'methane'
|
||||
name = 'argon_2+'
|
||||
name = 'CH2(singlet)'
|
||||
|
||||
Elemental Composition
|
||||
---------------------
|
||||
|
||||
The elemental composition is specified in the atoms entry, as follows::
|
||||
|
||||
atoms = "C:1 O:2" # CO2
|
||||
atoms = "C:1, O:2" # CO2 with optional comma
|
||||
atoms = "Y:1 Ba:2 Cu:3 O:6.5" # stoichiometric YBCO
|
||||
atoms = "" # a surface species representing an empty site
|
||||
atoms = "Ar:1 E:-2" # Ar++
|
||||
|
||||
For gaseous species, the elemental composition is well-defined, since the
|
||||
species represent distinct molecules. For species in solid or liquid solutions,
|
||||
or on surfaces, there may be several possible ways of defining the species. For
|
||||
example, an aqueous species might be defined with or without including the water
|
||||
molecules in the solvation cage surrounding it.
|
||||
|
||||
For surface species, it is possible to omit the ``atoms`` field entirely, in
|
||||
which case it is composed of nothing, and represents an empty surface site. This
|
||||
can also be done to represent vacancies in solids. A charged vacancy can be
|
||||
defined to be composed solely of electrons::
|
||||
|
||||
species(name = 'ysz-oxygen-vacancy',
|
||||
atoms = 'O:0, E:2',
|
||||
# ...,
|
||||
)
|
||||
|
||||
Note that an atom number of zero may be given if desired, but is completely
|
||||
equivalent to omitting that element.
|
||||
|
||||
The number of atoms of an element must be non-negative, except for the special
|
||||
"element" ``E`` that represents an electron.
|
||||
|
||||
Thermodynamic Properties
|
||||
------------------------
|
||||
|
||||
The :class:`phase` and :class:`ideal_interface` entries discussed in the last
|
||||
chapter implement specific models for the thermodynamic properties appropriate
|
||||
for the type of phase or interface they represent. Although each one may use
|
||||
different expressions to compute the properties, they all require thermodynamic
|
||||
property information for the individual species. For the phase types implemented
|
||||
at present, the properties needed are:
|
||||
|
||||
1. the molar heat capacity at constant pressure :math:`\hat{c}^0_p(T)` for a
|
||||
range of temperatures and a reference pressure :math:`P_0`;
|
||||
2. the molar enthalpy :math:`\hat{h}(T_0, P_0)` at :math:`P_0` and a reference
|
||||
temperature :math:`T_0`;
|
||||
3. the absolute molar entropy :math:`\hat{s}(T_0, P_0)` at :math:`(T_0, P_0)`.
|
||||
|
||||
See: :ref:`sec-thermo-models`
|
||||
|
||||
.. _sec-species-transport-models:
|
||||
|
||||
Species Transport Coefficients
|
||||
------------------------------
|
||||
|
||||
Transport property models in general require coefficients that express the
|
||||
effect of each species on the transport properties of the phase. The
|
||||
``transport`` field may be assigned an embedded entry that provides
|
||||
species-specific coefficients.
|
||||
|
||||
Currently, the only entry type is :class:`gas_transport`, which supplies
|
||||
parameters needed by the ideal-gas transport property models. The field values
|
||||
and their units of the :class:`gas_transport` entry are compatible with the
|
||||
transport database parameters described by Kee et al. [#Kee1986]_. Entries in
|
||||
transport databases in the format described in their report can be used directly
|
||||
in the fields of the :class:`gas_transport` entry, without requiring any unit
|
||||
conversion. The numeric field values should all be entered as pure numbers, with
|
||||
no attached units string.
|
||||
|
||||
.. _sec-thermo-models:
|
||||
|
||||
Thermodynamic Property Models
|
||||
=============================
|
||||
|
||||
The entry types described in this section can be used to provide data for the
|
||||
``thermo`` field of a :class:`species`. Each implements a different
|
||||
*parameterization* (functional form) for the heat capacity. Note that there is
|
||||
no requirement that all species in a phase use the same parameterization; each
|
||||
species can use the one most appropriate to represent how the heat capacity
|
||||
depends on temperature.
|
||||
|
||||
Currently, several types are implemented which provide species properties
|
||||
appropriate for models of ideal gas mixtures, ideal solutions, and pure
|
||||
compounds.
|
||||
|
||||
The NASA 7-Coefficient Polynomial Parameterization
|
||||
--------------------------------------------------
|
||||
|
||||
The NASA 7-coefficient polynomial parameterization is used to compute the
|
||||
species reference-state thermodynamic properties :math:`\hat{c}^0_p(T)`,
|
||||
:math:`\hat{h}^0(T)` and :math:`\hat{s}^0(T)`.
|
||||
|
||||
The NASA parameterization represents :math:`\hat{c}^0_p(T)` with a fourth-order
|
||||
polynomial:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{c_p^0(T)}{R} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4
|
||||
|
||||
\frac{h^0(T)}{RT} = a_0 + \frac{a1}{2}T + \frac{a_2}{3} T^2 +
|
||||
\frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}
|
||||
|
||||
\frac{s^0(T)}{R} = a_0 \ln T + a_1 T + \frac{a_2}{2} T^2 + \frac{a_3}{3} T^3 +
|
||||
\frac{a_4}{4} T^4 + a_6
|
||||
|
||||
Note that this is the "old" NASA polynomial form, used in the original NASA
|
||||
equilibrium program and in Chemkin, which uses 7 coefficients in each of two
|
||||
temperature regions. It is not compatible with the form used in the most recent
|
||||
version of the NASA equilibrium program, which uses 9 coefficients for each
|
||||
temperature region.
|
||||
|
||||
A NASA parameterization is defined by an embedded :class:`NASA` entry. Very
|
||||
often, two NASA parameterizations are used for two contiguous temperature
|
||||
ranges. This can be specified by assigning the ``thermo`` field of the
|
||||
``species`` entry a sequence of two :class:`NASA` entries::
|
||||
|
||||
# use one NASA parameterization for T < 1000 K, and another for T > 1000 K.
|
||||
species(name = "O2",
|
||||
atoms = " O:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.782456360E+00, -2.996734160E-03,
|
||||
9.847302010E-06, -9.681295090E-09, 3.243728370E-12,
|
||||
-1.063943560E+03, 3.657675730E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.282537840E+00, 1.483087540E-03,
|
||||
-7.579666690E-07, 2.094705550E-10, -2.167177940E-14,
|
||||
-1.088457720E+03, 5.453231290E+00] ) ) )
|
||||
|
||||
The NASA 9-Coefficient Polynomial Parameterization
|
||||
--------------------------------------------------
|
||||
|
||||
The NASA 9-coefficient polynomial parameterization [#McBride2002]_ ("NASA9" for
|
||||
short) is an extension of the NASA 7-coefficient polynomial parameterization
|
||||
which includes two additional terms in each temperature region, as well as
|
||||
supporting an arbitrary number of temperature regions.
|
||||
|
||||
The NASA9 parameterization represents the species thermodynamic properties with
|
||||
the following equations:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{C_p^0(T)}{R} = a_0 T^{-2} + a_1 T^{-1} + a_2 + a_3 T
|
||||
+ a_4 T^2 + a_5 T^3 + a_6 T^4
|
||||
|
||||
\frac{H^0(T)}{RT} = - a_0 T^{-2} + a_1 \frac{\ln T}{T} + a_2
|
||||
+ \frac{a_3}{2} T + \frac{a_4}{3} T^2 + \frac{a_5}{4} T^3 +
|
||||
\frac{a_6}{5} T^4 + \frac{a_7}{T}
|
||||
|
||||
\frac{s^0(T)}{R} = - \frac{a_0}{2} T^{-2} - a_1 T^{-1} + a_2 \ln T
|
||||
+ a_3 T + \frac{a_4}{2} T^2 + \frac{a_5}{3} T^3 + \frac{a_6}{4} T^4 + a_8
|
||||
|
||||
The following is an example of a species defined using the NASA9
|
||||
parameterization in three different temperature regions::
|
||||
|
||||
species(name=u'CO2',
|
||||
atoms='C:1 O:2',
|
||||
thermo=(NASA9([200.00, 1000.00],
|
||||
[ 4.943650540E+04, -6.264116010E+02, 5.301725240E+00,
|
||||
2.503813816E-03, -2.127308728E-07, -7.689988780E-10,
|
||||
2.849677801E-13, -4.528198460E+04, -7.048279440E+00]),
|
||||
NASA9([1000.00, 6000.00],
|
||||
[ 1.176962419E+05, -1.788791477E+03, 8.291523190E+00,
|
||||
-9.223156780E-05, 4.863676880E-09, -1.891053312E-12,
|
||||
6.330036590E-16, -3.908350590E+04, -2.652669281E+01]),
|
||||
NASA9([6000.00, 20000.00],
|
||||
[-1.544423287E+09, 1.016847056E+06, -2.561405230E+02,
|
||||
3.369401080E-02, -2.181184337E-06, 6.991420840E-11,
|
||||
-8.842351500E-16, -8.043214510E+06, 2.254177493E+03])),
|
||||
note='Gurvich,1991 pt1 p27 pt2 p24. [g 9/99]')
|
||||
|
||||
Thermodynamic data for a range of species can be obtained from the `NASA
|
||||
ThermoBuild <http://cearun.grc.nasa.gov/cea/index_ds.html>`_ tool. Using the web
|
||||
interface, an input file can be obtained for a set of species. This input file
|
||||
should then be modified so that the first line reads "`thermo nasa9`", as in the
|
||||
following example::
|
||||
|
||||
thermo nasa9
|
||||
200.000 1000.000 6000.000 20000.000 9/09/04
|
||||
CO Gurvich,1979 pt1 p25 pt2 p29.
|
||||
3 tpis79 C 1.00O 1.00 0.00 0.00 0.00 0 28.0101000 -110535.196
|
||||
200.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8671.104
|
||||
1.489045326D+04-2.922285939D+02 5.724527170D+00-8.176235030D-03 1.456903469D-05
|
||||
-1.087746302D-08 3.027941827D-12 -1.303131878D+04-7.859241350D+00
|
||||
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8671.104
|
||||
4.619197250D+05-1.944704863D+03 5.916714180D+00-5.664282830D-04 1.398814540D-07
|
||||
-1.787680361D-11 9.620935570D-16 -2.466261084D+03-1.387413108D+01
|
||||
6000.000 20000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8671.104
|
||||
8.868662960D+08-7.500377840D+05 2.495474979D+02-3.956351100D-02 3.297772080D-06
|
||||
-1.318409933D-10 1.998937948D-15 5.701421130D+06-2.060704786D+03
|
||||
CO2 Gurvich,1991 pt1 p27 pt2 p24.
|
||||
3 g 9/99 C 1.00O 2.00 0.00 0.00 0.00 0 44.0095000 -393510.000
|
||||
200.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 9365.469
|
||||
4.943650540D+04-6.264116010D+02 5.301725240D+00 2.503813816D-03-2.127308728D-07
|
||||
-7.689988780D-10 2.849677801D-13 -4.528198460D+04-7.048279440D+00
|
||||
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 9365.469
|
||||
1.176962419D+05-1.788791477D+03 8.291523190D+00-9.223156780D-05 4.863676880D-09
|
||||
-1.891053312D-12 6.330036590D-16 -3.908350590D+04-2.652669281D+01
|
||||
6000.000 20000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 9365.469
|
||||
-1.544423287D+09 1.016847056D+06-2.561405230D+02 3.369401080D-02-2.181184337D-06
|
||||
6.991420840D-11-8.842351500D-16 -8.043214510D+06 2.254177493D+03
|
||||
END PRODUCTS
|
||||
END REACTANTS
|
||||
|
||||
This file (saved for example as `nasathermo.dat`) can then be converted to the
|
||||
CTI format using the `ck2cti` script::
|
||||
|
||||
ck2cti --thermo=nasathermo.dat
|
||||
|
||||
To generate a full phase definition, create an input file defining the phase as
|
||||
well, saved for example as `nasa.inp`::
|
||||
|
||||
elements
|
||||
C O
|
||||
end
|
||||
|
||||
species
|
||||
CO CO2
|
||||
end
|
||||
|
||||
The two input files can then be converted together by calling::
|
||||
|
||||
ck2cti --input=nasa.inp --thermo=nasathermo.dat
|
||||
|
||||
|
||||
The Shomate Parameterization
|
||||
----------------------------
|
||||
|
||||
The Shomate parameterization is:
|
||||
|
||||
.. math::
|
||||
|
||||
\hat{c}_p^0(T) = A + Bt + Ct^2 + Dt^3 + \frac{E}{t^2}
|
||||
|
||||
\hat{h}^0(T) = At + \frac{Bt^2}{2} + \frac{Ct^3}{3} + \frac{Dt^4}{4} -
|
||||
\frac{E}{t} + F
|
||||
|
||||
\hat{s}^0(T) = A \ln t + B t + \frac{Ct^2}{2} + \frac{Dt^3}{3} -
|
||||
\frac{E}{2t^2} + G
|
||||
|
||||
where :math:`t = T / 1000 K`. It requires 7 coefficients A, B, C, D, E, F, and
|
||||
G. This parameterization is used to represent reference-state properties in the
|
||||
`NIST Chemistry WebBook <http://webbook.nist.gov/chemistry>`_. The values of the
|
||||
coefficients A through G should be entered precisely as shown there, with no
|
||||
units attached. Unit conversions to SI will be handled internally.
|
||||
|
||||
Example usage of the :class:`Shomate` directive::
|
||||
|
||||
# use a single Shomate parameterization.
|
||||
species(name = "O2",
|
||||
atoms = " O:2 ",
|
||||
thermo = Shomate( [298.0, 6000.0],
|
||||
[29.659, 6.137261, -1.186521, 0.09578, -0.219663,
|
||||
-9.861391, 237.948] ) )
|
||||
|
||||
Constant Heat Capacity
|
||||
----------------------
|
||||
|
||||
In some cases, species properties may only be required at a single temperature
|
||||
or over a narrow temperature range. In such cases, the heat capacity can be
|
||||
approximated as constant, and simpler expressions can be used for the thermodynamic
|
||||
properties. The :class:`const_cp` parameterization computes the properties as
|
||||
follows:
|
||||
|
||||
.. math::
|
||||
|
||||
\hat{c}_p^0(T) = \hat{c}_p^0(T_0)
|
||||
|
||||
\hat{h}^0(T) = \hat{h}^0(T_0) + \hat{c}_p^0\cdot(T-T_0)
|
||||
|
||||
\hat{s}^0(T) = \hat{s}^0(T_0) + \hat{c}_p^0 \ln (T/T_0)
|
||||
|
||||
The parameterization uses four constants: :math:`T_0, \hat{c}_p^0(T_0),
|
||||
\hat{h}^0(T_0), \hat{s}^0(T)`. The default value of :math:`T_0` is 298.15 K; the
|
||||
default value for the other parameters is 0.0.
|
||||
|
||||
Example::
|
||||
|
||||
thermo = const_cp(h0=(-393.51, 'kJ/mol'),
|
||||
s0=(213.785, 'J/mol/K'),
|
||||
cp0=(37.12, 'J/mol/K'))
|
||||
|
||||
Assuming that the :func:`units` function has been used to set the default energy
|
||||
units to Joules and the default quantity unit to kmol, this may be equivalently
|
||||
written as::
|
||||
|
||||
thermo = const_cp(h0=-3.9351e8, s0=2.13785e5, cp0=3.712e4)
|
||||
|
||||
.. See ##REF## for more examples of use of this parameterization.
|
||||
|
||||
.. rubric:: References
|
||||
|
||||
.. [#Kee1986] R. J. Kee, G. Dixon-Lewis, J. Warnatz, M. E. Coltrin, and J. A. Miller.
|
||||
A FORTRAN Computer Code Package for the Evaluation of Gas-Phase, Multicomponent
|
||||
Transport Properties. Technical Report SAND86-8246, Sandia National Laboratories, 1986.
|
||||
|
||||
.. [#Mcbride2002] B. J. McBride, M. J. Zehe, S. Gordon. "NASA Glenn Coefficients
|
||||
for Calculating Thermodynamic Properties of Individual Species,"
|
||||
NASA/TP-2002-211556, Sept. 2002.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import url('./sphinxdoc.css');
|
||||
@import url('./alabaster.css');
|
||||
|
||||
dl.method, dl.attribute, dl.staticmethod, dl.classmethod {
|
||||
border-top: 1px solid #aaa;
|
||||
|
|
@ -9,3 +9,11 @@ dl.class, dl.function {
|
|||
border-top: 2px solid #888;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
text-decoration: none !important;
|
||||
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" !important;
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
|
||||
#logo { width: 250px; }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[theme]
|
||||
inherit = sphinxdoc
|
||||
inherit = alabaster
|
||||
stylesheet = cantera.css
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
|
||||
******************************
|
||||
Compiling Cantera C++ Programs
|
||||
******************************
|
||||
|
||||
In general, it should be possible to use Cantera with any build system by
|
||||
specifying the appropriate header and library paths, and specifying the required
|
||||
libraries when linking. It is also necessary to specify the paths for libraries
|
||||
used by Cantera, e.g. Sundials, BLAS, and LAPACK.
|
||||
|
||||
pkg-config
|
||||
==========
|
||||
|
||||
On systems where the ``pkg-config`` program is installed, it can be used to
|
||||
determine the correct compiler and linker flags for use with Cantera. For
|
||||
example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
g++ myProgram.cpp -o myProgram $(pkg-config --cflags --libs cantera)
|
||||
|
||||
It can also be used to populate variables in a Makefile:
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
CFLAGS += $(shell pkg-config --cflags cantera)
|
||||
LIBS += $(shell pkg-config --libs cantera)
|
||||
|
||||
Or in an SConstruct file::
|
||||
|
||||
env.ParseConfig("pkg-config --cflags --libs cantera")
|
||||
|
||||
Note that ``pkg-config`` will work only if it can find the ``cantera.pc``
|
||||
file. If Cantera's libraries are not installed in a standard location such as
|
||||
``/usr/lib`` or ``/usr/local/lib``, you may need to set the ``PKG_CONFIG_PATH``
|
||||
environment variable appropriately before using ``pkg-config``.
|
||||
|
||||
SCons
|
||||
=====
|
||||
|
||||
SCons is a multi-platform, Python-based build system. It is the build system
|
||||
used to compile Cantera. The description of how to build a project is contained
|
||||
in a file named ``SConstruct``. The ``SConstruct`` file is actually a Python
|
||||
script, which makes it very straightforward to add functionality to a
|
||||
SCons-based build system.
|
||||
|
||||
A typical ``SConstruct`` file for compiling a program that uses Cantera might
|
||||
look like this::
|
||||
|
||||
env = Environment()
|
||||
|
||||
env.Append(CCFLAGS='-g',
|
||||
CPPPATH=['/usr/local/cantera/include',
|
||||
'/usr/local/sundials/include'],
|
||||
LIBS=['cantera', 'sundials_cvodes', 'sundials_ida',
|
||||
'sundials_nvecserial', 'lapack', 'blas'],
|
||||
LIBPATH=['/usr/local/cantera/lib',
|
||||
'/usr/local/sundials/lib'],
|
||||
LINKFLAGS=['-g', '-pthread'])
|
||||
|
||||
sample = env.Program('sample', 'sample.cpp')
|
||||
Default(sample)
|
||||
|
||||
This script establishes what SCons refers to as a "construction environment"
|
||||
named ``env``, and sets the header (``CPPPATH``) and library (``LIBPATH``) paths
|
||||
to include the directories containing the Cantera headers and libraries, as well
|
||||
as libraries that Cantera depends on, such as Sundials, BLAS, and LAPACK. Then,
|
||||
a program named ``sample`` is compiled using the single source file
|
||||
``sample.cpp``.
|
||||
|
||||
Several other example ``SConstruct`` files are included with the C++ examples
|
||||
contained in the ``samples`` subdirectory of the Cantera installation directory.
|
||||
|
||||
For more information on SCons, see the `SCons Wiki <http://scons.org/wiki/>`_
|
||||
and the `SCons homepage <http://www.scons.org>`_.
|
||||
|
||||
CMake
|
||||
=====
|
||||
|
||||
CMake is a multi-platform build system which uses a high-level project
|
||||
description to generate platform-specific build scripts (i.e. on Linux, CMake
|
||||
will generate Makefiles). The configuration file for a CMake project is called
|
||||
``CMakeLists.txt``. A typical ``CMakeLists.txt`` file for compiling a program
|
||||
that uses Cantera might look like this:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project (sample)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
include_directories("/opt/cantera/include" "/opt/sundials-2.7.0/include")
|
||||
link_directories("/opt/cantera/lib" "/opt/sundials-2.7.0/lib")
|
||||
|
||||
add_executable(sample sample.cpp)
|
||||
target_link_libraries(sample cantera sundials_cvodes sundials_ida sundials_nvecserial fmt Threads::Threads)
|
||||
|
||||
Several example ``CMakeLists.txt`` files are included with the C++ examples
|
||||
contained in the ``samples`` subdirectory of the Cantera installation directory,
|
||||
which have the paths and lists of libraries correctly configured for system on
|
||||
which they are installed.
|
||||
|
||||
Make
|
||||
====
|
||||
|
||||
Cantera is distributed with an "include Makefile" that can be used with
|
||||
Make-based build systems. This file ``Cantera.mak`` is located in the
|
||||
``samples`` subdirectory of the Cantera installation directory. To use it, add a
|
||||
line referencing this file to the top of your Makefile::
|
||||
|
||||
include path/to/Cantera.mak
|
||||
|
||||
The path specified should be the relative path from the ``Makefile`` to
|
||||
``Cantera.mak``. This file defines several variables which can be used in your
|
||||
Makefile. The following is an example ``Makefile`` that uses the definitions
|
||||
contained in ``Cantera.mak``:
|
||||
|
||||
.. code-block:: makefile
|
||||
|
||||
include ../../Cantera.mak
|
||||
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
RM=rm -f
|
||||
CCFLAGS=-g
|
||||
CPPFLAGS=$(CANTERA_INCLUDES)
|
||||
LDFLAGS=
|
||||
LDLIBS=$(CANTERA_LIBS)
|
||||
|
||||
SRCS=sample.cpp
|
||||
OBJS=$(subst .cpp,.o,$(SRCS))
|
||||
|
||||
all: sample
|
||||
|
||||
kinetics1: $(OBJS)
|
||||
$(CXX) $(LDFLAGS) -o sample $(OBJS) $(LDLIBS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS)
|
||||
|
||||
dist-clean: clean
|
||||
$(RM) *~
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#include "cantera/thermo.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace Cantera;
|
||||
|
||||
// The actual code is put into a function that
|
||||
// can be called from the main program.
|
||||
void simple_demo()
|
||||
{
|
||||
// Create a new phase
|
||||
std::unique_ptr<ThermoPhase> gas(newPhase("h2o2.cti","ohmech"));
|
||||
|
||||
// Set its state by specifying T (500 K) P (2 atm) and the mole
|
||||
// fractions. Note that the mole fractions do not need to sum to
|
||||
// 1.0 - they will be normalized internally. Also, the values for
|
||||
// any unspecified species will be set to zero.
|
||||
gas->setState_TPX(500.0, 2.0*OneAtm, "H2O:1.0, H2:8.0, AR:1.0");
|
||||
|
||||
// Print a summary report of the state of the gas
|
||||
std::cout << gas->report() << std::endl;
|
||||
}
|
||||
|
||||
// the main program just calls function simple_demo within
|
||||
// a 'try' block, and catches CanteraError exceptions that
|
||||
// might be thrown
|
||||
int main()
|
||||
{
|
||||
try {
|
||||
simple_demo();
|
||||
} catch (CanteraError& err) {
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#include "cantera/thermo.h"
|
||||
#include "cantera/kinetics.h"
|
||||
#include "cantera/transport.h"
|
||||
|
||||
using namespace Cantera;
|
||||
|
||||
// The actual code is put into a function that can be called from the main
|
||||
// program.
|
||||
void simple_demo2()
|
||||
{
|
||||
// Create a new phase
|
||||
std::unique_ptr<ThermoPhase> gas(newPhase("gri30.cti", "gri30_mix"));
|
||||
|
||||
// List of phases participating in reactions (just one for homogeneous
|
||||
// kinetics)
|
||||
std::vector<ThermoPhase*> phases{gas.get()};
|
||||
|
||||
// Create the Kinetics object. Based on the phase definition used, this will
|
||||
// be a GasKinetics object.
|
||||
std::unique_ptr<Kinetics> kin(newKineticsMgr(gas->xml(), phases));
|
||||
|
||||
// Set an "interesting" mixture state where we will observe non-zero reacton
|
||||
// rates.
|
||||
gas->setState_TPX(500.0, 2.0*OneAtm, "CH4:1.0, O2:1.0, N2:3.76");
|
||||
gas->equilibrate("HP");
|
||||
gas->setState_TP(gas->temperature() - 100, gas->pressure());
|
||||
|
||||
// Get the net reaction rates
|
||||
vector_fp wdot(kin->nReactions());
|
||||
kin->getNetRatesOfProgress(wdot.data());
|
||||
|
||||
writelog("Net reaction rates for reactions involving CO2\n");
|
||||
size_t kCO2 = gas->speciesIndex("CO2");
|
||||
for (size_t i = 0; i < kin->nReactions(); i++) {
|
||||
if (kin->reactantStoichCoeff(kCO2, i)
|
||||
|| kin->productStoichCoeff(kCO2, i)) {
|
||||
writelog("{:3d} {:30s} {: .8e}\n",
|
||||
i, kin->reactionString(i), wdot[i]);
|
||||
}
|
||||
}
|
||||
writelog("\n");
|
||||
|
||||
// Create a Transport object. Based on the transport model specified in the
|
||||
// "gri30_mix" phase, this will be a MixGasTransport object.
|
||||
std::unique_ptr<Transport> trans(newDefaultTransportMgr(gas.get()));
|
||||
writelog("T viscosity thermal conductivity\n");
|
||||
writelog("------ ----------- --------------------\n");
|
||||
for (size_t n = 0; n < 5; n++) {
|
||||
double T = 300 + 100 * n;
|
||||
gas->setState_TP(T, gas->pressure());
|
||||
writelog("{:.1f} {:.4e} {:.4e}\n",
|
||||
T, trans->viscosity(), trans->thermalConductivity());
|
||||
}
|
||||
}
|
||||
|
||||
// the main program just calls function simple_demo2 within a 'try' block, and
|
||||
// catches exceptions that might be thrown
|
||||
int main()
|
||||
{
|
||||
try {
|
||||
simple_demo2();
|
||||
} catch (std::exception& err) {
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#include "cantera/thermo.h"
|
||||
|
||||
using namespace Cantera;
|
||||
|
||||
void equil_demo()
|
||||
{
|
||||
std::unique_ptr<ThermoPhase> gas(newPhase("h2o2.cti","ohmech"));
|
||||
gas->setState_TPX(1500.0, 2.0*OneAtm, "O2:1.0, H2:3.0, AR:1.0");
|
||||
gas->equilibrate("TP");
|
||||
std::cout << gas->report() << std::endl;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
try {
|
||||
equil_demo();
|
||||
} catch (CanteraError& err) {
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
|
||||
************************************
|
||||
Chemical Equilibrium Example Program
|
||||
************************************
|
||||
|
||||
In the program below, the `equilibrate` method is called to set the gas to a
|
||||
state of chemical equilibrium, holding the temperature and pressure fixed.
|
||||
|
||||
.. literalinclude:: demoequil.cpp
|
||||
:language: c++
|
||||
|
||||
The program output is::
|
||||
|
||||
temperature 1500 K
|
||||
pressure 202650 Pa
|
||||
density 0.316828 kg/m^3
|
||||
mean mol. weight 19.4985 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy -4.17903e+06 -8.149e+07 J
|
||||
internal energy -4.81866e+06 -9.396e+07 J
|
||||
entropy 11283.3 2.2e+05 J/K
|
||||
Gibbs function -2.1104e+07 -4.115e+08 J
|
||||
heat capacity c_p 1893.06 3.691e+04 J/K
|
||||
heat capacity c_v 1466.65 2.86e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
H2 0.249996 0.0258462 -19.2954
|
||||
H 6.22521e-06 3.218e-07 -9.64768
|
||||
O 7.66933e-12 6.29302e-12 -26.3767
|
||||
O2 7.1586e-12 1.17479e-11 -52.7533
|
||||
OH 3.55353e-07 3.09952e-07 -36.0243
|
||||
H2O 0.499998 0.461963 -45.672
|
||||
HO2 7.30338e-15 1.2363e-14 -62.401
|
||||
H2O2 3.95781e-13 6.90429e-13 -72.0487
|
||||
AR 0.249999 0.51219 -21.3391
|
||||
|
||||
|
||||
How can we tell that this is really a state of chemical equilibrium? Well, by
|
||||
applying the equation of reaction equilibrium to formation reactions from the
|
||||
elements, it is straightforward to show that:
|
||||
|
||||
.. math:: \mu_k = \sum_m \lambda_m a_{km}.
|
||||
|
||||
where :math:`\mu_k` is the chemical potential of species *k*, :math:`a_{km}` is
|
||||
the number of atoms of element *m* in species *k*, and :math:`\lambda_m` is the
|
||||
chemical potential of the elemental species per atom (the so-called "element
|
||||
potential"). In other words, the chemical potential of each species in an
|
||||
equilibrium state is a linear sum of contributions from each atom. We see that
|
||||
this is true in the output above---the chemical potential of H2 is exactly
|
||||
twice that of H, the chemical potential for OH is the sum of the values for H
|
||||
and O, the value for H2O2 is twice as large as the value for OH, and so on.
|
||||
|
||||
We'll see later how the :ct:`equilibrate <Cantera::ThermoPhase::equilibrate>`
|
||||
function really works.
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
Creating ThermoPhase, Kinetics, and Transport objects
|
||||
=====================================================
|
||||
|
||||
The following program demonstrates the general method for creating the following
|
||||
object types:
|
||||
|
||||
- `ThermoPhase` - represents the thermodynamic properties of mixtures containing
|
||||
one or more species)
|
||||
- `Kinetics` - represents a kinetic mechanism involving one or more phases)
|
||||
- `Transport` - computes transport properties for a `ThermoPhase`
|
||||
|
||||
This program uses "factory" functions to create derived objects objects of the
|
||||
appropriate type which are specified in the input file `gri30.cti`.
|
||||
|
||||
.. literalinclude:: demo1b.cpp
|
||||
:language: c++
|
||||
|
||||
This program produces the output below::
|
||||
|
||||
Net reaction rates for reactions involving CO2
|
||||
11 CO + O (+M) <=> CO2 (+M) 3.54150724e-08
|
||||
13 HCO + O <=> CO2 + H 1.95680014e-11
|
||||
29 CH2CO + O <=> CH2 + CO2 3.45366988e-17
|
||||
30 CO + O2 <=> CO2 + O 2.70102522e-13
|
||||
41 CO2 + 2 H <=> CO2 + H2 3.45305359e-08
|
||||
98 CO + OH <=> CO2 + H 6.46935907e-03
|
||||
119 CO + HO2 <=> CO2 + OH 1.86807529e-10
|
||||
131 CH + CO2 <=> CO + HCO 9.41365695e-14
|
||||
151 CH2(S) + CO2 <=> CH2 + CO2 3.11161382e-12
|
||||
152 CH2(S) + CO2 <=> CH2O + CO 2.85339329e-11
|
||||
225 NCO + O2 <=> CO2 + NO 3.74127282e-19
|
||||
228 NCO + NO <=> CO2 + N2 6.25672779e-14
|
||||
261 HNCO + O <=> CO2 + NH 6.84524890e-13
|
||||
267 HNCO + OH <=> CO2 + NH2 7.78871264e-10
|
||||
279 CO2 + NH <=> CO + HNO -3.30333658e-09
|
||||
281 NCO + NO2 <=> CO2 + N2O 2.14286686e-20
|
||||
282 CO2 + N <=> CO + NO 6.42658283e-10
|
||||
289 CH2 + O2 => CO2 + 2 H 1.51032319e-18
|
||||
304 CH2CHO + O => CH2 + CO2 + H 1.00331734e-19
|
||||
|
||||
T viscosity thermal conductivity
|
||||
------ ----------- --------------------
|
||||
300.0 1.6658e-05 4.2089e-02
|
||||
400.0 2.0861e-05 5.2537e-02
|
||||
500.0 2.4681e-05 6.2451e-02
|
||||
600.0 2.8218e-05 7.2157e-02
|
||||
700.0 3.1534e-05 8.1754e-02
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
|
||||
****************
|
||||
C++ Header Files
|
||||
****************
|
||||
|
||||
Cantera provides some header files designed for use in C++ application
|
||||
programs. These are designed to include those portions of Cantera needed for
|
||||
particular types of calculations.
|
||||
|
||||
These headers are designed for use in C++ application programs, and are not
|
||||
included by the Cantera core. The headers and their functions are:
|
||||
|
||||
``IdealGasMix.h``
|
||||
Provides class :ct:`IdealGasMix`.
|
||||
|
||||
``Interface.h``
|
||||
Provides class :ct:`Interface`.
|
||||
|
||||
``integrators.h``
|
||||
ODE Integrators.
|
||||
|
||||
``kinetics.h``
|
||||
Base kinetics classes and functions for creating :ct:`Kinetics` objects from
|
||||
input files.
|
||||
|
||||
``onedim.h``
|
||||
One-dimensional reacting flows.
|
||||
|
||||
``reactionpaths.h``
|
||||
Reaction path diagrams.
|
||||
|
||||
``thermo.h``
|
||||
Base thermodynamic classes and functions for creating :ct:`ThermoPhase`
|
||||
objects from input files.
|
||||
|
||||
``transport.h``
|
||||
Base transport property classes and functions for creating :ct:`Transport`
|
||||
objects from input files.
|
||||
|
||||
``zerodim.h``
|
||||
Zero-dimensional reactor networks.
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
**************************
|
||||
C++ Interface User's Guide
|
||||
**************************
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
compiling
|
||||
headers
|
||||
thermo
|
||||
simple-example
|
||||
equil-example
|
||||
factories
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
|
||||
*************************
|
||||
A Very Simple C++ Program
|
||||
*************************
|
||||
|
||||
A short C++ program that uses Cantera is shown below. This program reads in a
|
||||
specification of a gas mixture from an input file, and then builds a new object
|
||||
representing the mixture. It then sets the thermodynamic state and composition
|
||||
of the gas mixture, and prints out a summary of its properties.
|
||||
|
||||
.. literalinclude:: demo1a.cpp
|
||||
:language: c++
|
||||
|
||||
Before you can run this program, it first needs to be compiled. On a Linux
|
||||
system using the GCC compiler, a typical command line for compiling this program
|
||||
might look like this::
|
||||
|
||||
g++ -o combustor -pthread -O3 -std=c++0x -I/opt/cantera-2.3.0/include -L/opt/cantera-2.3.0/lib -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial combustor.cpp
|
||||
|
||||
The locations of the Cantera header files (specified by the `-I` option) and the
|
||||
libraries (specified by the `-L` option) will vary depending on where you
|
||||
installed Cantera, and the list of libraries (such as `sundials_cvodes`) will
|
||||
vary depending on what options you used when compiling Cantera. For more
|
||||
advanced and flexible methods of compiling programs which use the Cantera C++
|
||||
library, see :doc:`compiling`.
|
||||
|
||||
This program produces the output below::
|
||||
|
||||
temperature 500 K
|
||||
pressure 202650 Pa
|
||||
density 0.361163 kg/m^3
|
||||
mean mol. weight 7.40903 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy -2.47725e+06 -1.835e+07 J
|
||||
internal energy -3.03836e+06 -2.251e+07 J
|
||||
entropy 20700.1 1.534e+05 J/K
|
||||
Gibbs function -1.28273e+07 -9.504e+07 J
|
||||
heat capacity c_p 3919.29 2.904e+04 J/K
|
||||
heat capacity c_v 2797.09 2.072e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
H2 0.8 0.217667 -15.6441
|
||||
H 0 0
|
||||
O 0 0
|
||||
O2 0 0
|
||||
OH 0 0
|
||||
H2O 0.1 0.243153 -82.9531
|
||||
HO2 0 0
|
||||
H2O2 0 0
|
||||
AR 0.1 0.53918 -20.5027
|
||||
|
||||
As C++ programs go, this one is *very* short. It is the Cantera equivalent of
|
||||
the "Hello, World" program most programming textbooks begin with. But it
|
||||
illustrates some important points in writing Cantera C++ programs.
|
||||
|
||||
Catching :ct:`CanteraError` exceptions
|
||||
======================================
|
||||
|
||||
The entire body of the program is put inside a function that is invoked within
|
||||
a ``try`` block in the main program. In this way, exceptions thrown in the
|
||||
function or in any procedure it calls may be caught. In this program, a
|
||||
``catch`` block is defined for exceptions of type :ct:`CanteraError`. Cantera
|
||||
throws exceptions of this type, so it is always a good idea to catch them.
|
||||
|
||||
The ``report`` function
|
||||
=======================
|
||||
|
||||
The :ct:`report` function generates a nicely-formatted report of the properties of
|
||||
a phase, including its composition in both mole (X) and mass (Y) units. For
|
||||
each species present, the non-dimensional chemical potential is also printed.
|
||||
This is handy particularly when doing equilibrium calculations. This function
|
||||
is very useful to see at a glance the state of some phase.
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
**********************************
|
||||
Computing Thermodynamic Properties
|
||||
**********************************
|
||||
|
||||
Class ThermoPhase
|
||||
=================
|
||||
|
||||
Cantera can be used to compute thermodynamic properties of pure substances,
|
||||
solutions, and mixtures of various types, including ones containing multiple
|
||||
phases. The first step is to create an object that represents each phase. A
|
||||
simple, complete program that creates an object representing a gas mixture and
|
||||
prints its temperature is shown below:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#include "cantera/thermo.h"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::unique_ptr<Cantera::ThermoPhase> gas(
|
||||
Cantera::newPhase("h2o2.cti", "ohmech"));
|
||||
std::cout << gas->temperature() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Class :ct:`ThermoPhase` is the base class for Cantera classes that represent
|
||||
phases of matter. It defines the public interface for all classes that represent
|
||||
phases. For example, it specifies that they all have a method :ct:`temperature
|
||||
<Phase::temperature>` that returns the current temperature, a method
|
||||
:ct:`setTemperature(double T) <Phase::setTemperature>` that sets the
|
||||
temperature, a method :ct:`getChemPotentials(double* mu)
|
||||
<ThermoPhase::getChemPotentials>` that writes the species chemical potentials
|
||||
into array ``mu``, and so on.
|
||||
|
||||
Class ThermoPhase can be used to represent the intensive state of any
|
||||
single-phase solution of multiple species. The phase may be a bulk,
|
||||
three-dimensional phase (a gas, a liquid, or a solid), or it may be a
|
||||
two-dimensional surface phase, or even a one-dimensional "edge" phase. The
|
||||
specific attributes of each type of phase are specified by deriving a class from
|
||||
:ct:`ThermoPhase` and providing implementations for its virtual methods.
|
||||
|
||||
Cantera has a wide variety of models for bulk phase currently. Special attention
|
||||
(in terms of the speed of execution) has been paid to an ideal gas phase
|
||||
implementation, where the species thermodynamic polynomial representations
|
||||
adhere to either the NASA polynomial form or to the Shomate polynomial
|
||||
form. This is widely used in combustion applications, the original application
|
||||
that Cantera was designed for. Recently, a lot of effort has been placed into
|
||||
constructing non-ideal liquid phase thermodynamics models that are used in
|
||||
electrochemistry and battery applications. These models include a Pitzer
|
||||
implementation for brines solutions and a Margules excess Gibbs free energy
|
||||
implementation for molten salts.
|
||||
|
||||
The Intensive Thermodynamic State
|
||||
---------------------------------
|
||||
|
||||
Class :ct:`ThermoPhase` and classes derived from it work only with the intensive
|
||||
thermodynamic state. That is, all extensive properties (enthalpy, entropy,
|
||||
internal energy, volume, etc.) are computed for a unit quantity (on a mass or
|
||||
mole basis). For example, there is a method :ct:`enthalpy_mole()` that returns
|
||||
the molar enthalpy (J/kmol), and a method :ct:`enthalpy_mass()` that returns the
|
||||
specific enthalpy (J/kg), but no method *enthalpy()* that would return the total
|
||||
enthalpy (J). This is because class ThermoPhase does not store the total amount
|
||||
(mass or mole) of the phase.
|
||||
|
||||
The intensive state of a single-component phase in equilibrium is fully
|
||||
specified by the values of any :math:`r+1` independent thermodynamic properties,
|
||||
where :math:`r` is the number of reversible work modes. If the only reversible
|
||||
work mode is compression (a "simple compressible substance"), then two
|
||||
properties suffice to specify the intensive state. Class ThermoPhase stores
|
||||
internally the values of the *temperature*, the *mass density*, and the *mass
|
||||
fractions* of all species. These values are sufficient to fix the intensive
|
||||
thermodynamic state of the phase, and to compute any other intensive properties.
|
||||
This choice is arbitrary, and for most purposes you can't tell which properties
|
||||
are stored and which are computed.
|
||||
|
||||
Derived Classes
|
||||
---------------
|
||||
|
||||
Many of the methods of ThermoPhase are declared virtual, and are meant to be
|
||||
overloaded in classes derived from ThermoPhase. For example, class
|
||||
:ct:`IdealGasPhase` derives from :ct:`ThermoPhase`, and represents ideal gas
|
||||
mixtures.
|
||||
|
||||
Although class ThermoPhase defines the interface for all classes representing
|
||||
phases, it only provides implementations for a few of the methods. This is
|
||||
because ThermoPhase does not actually know the equation of state of any
|
||||
phase---this information is provided by classes that derive from ThermoPhase.
|
||||
The methods implemented by ThermoPhase are ones that apply to all phases,
|
||||
independent of the equation of state. For example, it implements methods
|
||||
``temperature()`` and ``setTemperature()``, since the temperature value is
|
||||
stored internally.
|
||||
|
||||
* `Classes which inherit from ThermoPhase <../../../doxygen/html/group__thermoprops.html>`_
|
||||
* `Classes which handle standard states for species <../../../doxygen/html/group__spthermo.html>`_
|
||||
|
||||
|
||||
Example Program
|
||||
===============
|
||||
|
||||
In the program below, a gas mixture object is created, and a few thermodynamic
|
||||
properties are computed and printed out:
|
||||
|
||||
.. literalinclude:: thermodemo.cpp
|
||||
:language: c++
|
||||
|
||||
Note that the methods that compute the properties take no input parameters. The
|
||||
properties are computed for the state that has been previously set and stored
|
||||
internally within the object.
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
- methods that return *molar* properties have names that end in ``_mole``.
|
||||
- methods that return properties *per unit mass* have names that end in
|
||||
``_mass``.
|
||||
- methods that write an array of values into a supplied output array have names
|
||||
that begin with ``get``. For example, the method
|
||||
:ct:`ThermoPhase::getChemPotentials(double* mu)` writes the species chemical
|
||||
potentials into the output array ``mu``.
|
||||
|
||||
The thermodynamic property methods are declared in class :ct:`ThermoPhase`,
|
||||
which is the base class from which all classes that represent any type of phase
|
||||
of matter derive.
|
||||
|
||||
See :ct:`ThermoPhase` for the full list of available thermodynamic properties.
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#include "cantera/thermo.h"
|
||||
|
||||
using namespace Cantera;
|
||||
|
||||
void thermo_demo(const std::string& file, const std::string& phase)
|
||||
{
|
||||
shared_ptr<ThermoPhase> gas(newPhase(file, phase));
|
||||
gas->setState_TPX(1500.0, 2.0*OneAtm, "O2:1.0, H2:3.0, AR:1.0");
|
||||
|
||||
// temperature, pressure, and density
|
||||
std::cout << gas->temperature() << std::endl;
|
||||
std::cout << gas->pressure() << std::endl;
|
||||
std::cout << gas->density() << std::endl;
|
||||
|
||||
// molar thermodynamic properties
|
||||
std::cout << gas->enthalpy_mole() << std::endl;
|
||||
std::cout << gas->entropy_mole() << std::endl;
|
||||
|
||||
// specific (per unit mass) thermodynamic properties
|
||||
std::cout << gas->enthalpy_mass() << std::endl;
|
||||
std::cout << gas->entropy_mass() << std::endl;
|
||||
|
||||
// chemical potentials of the species
|
||||
int numSpecies = gas->nSpecies();
|
||||
vector_fp mu(numSpecies);
|
||||
gas->getChemPotentials(&mu[0]);
|
||||
int n;
|
||||
for (n = 0; n < numSpecies; n++) {
|
||||
std::cout << gas->speciesName(n) << " " << mu[n] << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
try {
|
||||
thermo_demo("h2o2.cti","ohmech");
|
||||
} catch (CanteraError& err) {
|
||||
std::cout << err.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
:orphan:
|
||||
|
||||
.. _py-example-@script_name@:
|
||||
|
||||
@script_name@
|
||||
=======================================================================
|
||||
|
||||
.. literalinclude:: @script_path@
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
.. _sec-cython-examples:
|
||||
|
||||
.. py:currentmodule:: cantera
|
||||
|
||||
Index of Examples
|
||||
=================
|
||||
|
||||
This is an index of the examples included with the Cantera Python module. They
|
||||
can be found in the `examples` subdirectory of the Cantera Python module's
|
||||
installation directory. To determine the location of this directory, run the following in your Python interpreter::
|
||||
|
||||
import cantera.examples
|
||||
print(cantera.examples.__path__)
|
||||
|
||||
Thermodynamics
|
||||
--------------
|
||||
|
||||
@python_thermo_examples@
|
||||
|
||||
Kinetics
|
||||
--------
|
||||
|
||||
@python_kinetics_examples@
|
||||
|
||||
Transport
|
||||
---------
|
||||
|
||||
@python_transport_examples@
|
||||
|
||||
Reactor Networks
|
||||
----------------
|
||||
|
||||
@python_reactors_examples@
|
||||
|
||||
One-dimensional Flames
|
||||
----------------------
|
||||
|
||||
@python_onedim_examples@
|
||||
|
||||
Multiphase Mixtures
|
||||
-------------------
|
||||
|
||||
@python_multiphase_examples@
|
||||
|
||||
Surface Chemistry
|
||||
-----------------
|
||||
|
||||
@python_surface_chemistry_examples@
|
||||
|
|
@ -8,8 +8,6 @@ Contents:
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
migrating
|
||||
tutorial
|
||||
importing
|
||||
thermo
|
||||
kinetics
|
||||
|
|
@ -17,6 +15,3 @@ Contents:
|
|||
zerodim
|
||||
onedim
|
||||
constants
|
||||
examples
|
||||
|
||||
Application Examples as Jupyter Notebooks <https://github.com/Cantera/cantera-jupyter#cantera-jupyter>
|
||||
|
|
|
|||
|
|
@ -1,282 +0,0 @@
|
|||
.. _sec-python-migration:
|
||||
|
||||
Migrating from the Old Python Module
|
||||
************************************
|
||||
|
||||
With the introduction of the new Cython-based Python module in Cantera 2.1,
|
||||
there are a number of changes to the interface which require modifications to
|
||||
scripts in order for them to work with the new module. Broadly speaking, the
|
||||
changes to the interface are intended to make the Cantera Python module easier
|
||||
to use, and provide a more "Pythonic" interface by making use of common Python
|
||||
language idioms, language features, and style guidelines.
|
||||
|
||||
This document describes the changes to the Python module which are likely to
|
||||
require modifications to existing code.
|
||||
|
||||
Importing the Python Module
|
||||
---------------------------
|
||||
|
||||
The name of the Python module is now ``cantera`` with a lowercase "c". This
|
||||
change is made partly for compliance with `PEP8
|
||||
<http://www.python.org/dev/peps/pep-0008/#package-and-module-names>`_.
|
||||
|
||||
Furthermore, the various submodules, e.g. ``Cantera.Reactor`` have been
|
||||
eliminated. All classes and functions are available directly in the
|
||||
``cantera`` module.
|
||||
|
||||
To avoid the namespace clutter introduced by using ``import *``, the following
|
||||
syntax is preferred::
|
||||
|
||||
>>> import cantera as ct
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
Generally, the names used in the Cantera Python module have been changed to
|
||||
follow the recommendations of PEP8. This means that the names of methods and
|
||||
properties are generally written as ``lowercase_with_underscores`` instead of
|
||||
``capitalizingEachWord``. Also, some abbreviated names have been expanded. For
|
||||
example, the following function calls::
|
||||
|
||||
>>> gas.speciesName(0)
|
||||
>>> gas.nAtoms('H2', 'H')
|
||||
>>> gas.reactionEqn(3)
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> gas.species_name(0)
|
||||
>>> gas.n_atoms('H2', 'H')
|
||||
>>> gas.reaction_equation(3)
|
||||
|
||||
Importing Phases
|
||||
----------------
|
||||
|
||||
The functions ``importPhase`` and ``IdealGasMix`` have been removed.
|
||||
`Solution` objects, which represent the phase (regardless of the underlying
|
||||
thermodynamic model) as well as providing access to kinetics and transport
|
||||
properties, are created directly using the `Solution` class. For example::
|
||||
|
||||
>>> gas = Solution('h2o2.xml')
|
||||
|
||||
Creates an object which represents an ``IdealGasPhase`` mixture with a
|
||||
``GasKinetics`` reaction mechansm and a ``MixTransport`` transport model,
|
||||
based on the parameters specified in the input file.
|
||||
|
||||
For importing multiple phases from a single file, the ``importPhases`` function
|
||||
has been retained with the new name ``import_phases``::
|
||||
|
||||
>>> gas, anode_bulk, oxide = ct.import_phases('sofc.cti',
|
||||
['gas', 'metal', 'oxide_bulk'])
|
||||
|
||||
Interfaces and edges are created using the `Interface` class, which represents
|
||||
both 1D and 2D interfaces, rather than using the ``importEdge`` and
|
||||
``importInterface`` functions::
|
||||
|
||||
>>> anode_surf = ct.Interface('sofc.cti', 'metal_surface', [gas])
|
||||
>>> oxide_surf = ct.Interface('sofc.cti', 'oxide_surface', [gas, oxide])
|
||||
>>> tpb = ct.Interface('sofc.cti', 'tpb', [anode_bulk, anode_surf, oxide_surf])
|
||||
|
||||
|
||||
Accessing Properties
|
||||
--------------------
|
||||
|
||||
Most methods for accessing and setting the properties of objects have been
|
||||
replaced with Python "properties" which do not need to be "called" in order to
|
||||
accessed or changed. For example, the following::
|
||||
|
||||
>>> u = gas.intEnergy_mass()
|
||||
>>> Wmx = gas.meanMolecularWeight()
|
||||
>>> kf = gas.fwdRateConstants()
|
||||
>>> gas.setName('foo')
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> u = gas.int_energy_mass
|
||||
>>> Wmx = gas.mean_molecular_weight
|
||||
>>> kf = gas.forward_rate_constants
|
||||
>>> gas.name = 'foo'
|
||||
|
||||
Some common properties have been renamed according to the variable that is
|
||||
typically used to represent them::
|
||||
|
||||
>>> gas.temperature()
|
||||
>>> gas.pressure()
|
||||
>>> gas.massFractions()
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> gas.T
|
||||
>>> gas.P
|
||||
>>> gas.Y
|
||||
|
||||
For pure fluid phases, the property ``X`` refers to the vapor mass fraction or
|
||||
"quality" of the phase. The following::
|
||||
|
||||
>>> w = Cantera.liquidvapor.Water()
|
||||
>>> w.set(T=400, Vapor=0.5)
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> w = ct.Water()
|
||||
>>> w.TX = 400, 0.5
|
||||
|
||||
Setting Thermodynamic State
|
||||
---------------------------
|
||||
|
||||
The ``set`` method has been removed in favor of property pairs or triplets. The
|
||||
following::
|
||||
|
||||
>>> gas.setMoleFractions('CH4:1.0, O2:0.1')
|
||||
>>> gas.set(X='CH4:1.0, O2:0.1')
|
||||
>>> gas.set(U=-1.1e6, V=5.5)
|
||||
>>> gas.set(T=300, P=101325, Y='H2:1.0')
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> gas.X = 'CH4:1.0, O2:0.1'
|
||||
>>> gas.X = 'CH4:1.0, O2:0.1'
|
||||
>>> gas.UV = -1.1e6, 5.5
|
||||
>>> gas.TPY = 300, 101325, 'H2:1.0'
|
||||
|
||||
The ``saveState`` and ``restoreState`` methods have been removed. Their
|
||||
functionality can be replicated as follows::
|
||||
|
||||
>>> state = gas.TDY
|
||||
>>> # (operations that modify gas)
|
||||
>>> gas.TDY = state
|
||||
|
||||
Printing Phase Summaries
|
||||
------------------------
|
||||
|
||||
`Solution` objects no longer print out a verbose summary as their string
|
||||
representation. Instead, the summary report can be generated using the
|
||||
`report()` method, which returns a string, or by calling the `Solution` object
|
||||
to print the report to the screen. The following are equivalent::
|
||||
|
||||
>>> print(gas.report())
|
||||
>>> gas()
|
||||
|
||||
Getting Properties for a Subset of Species
|
||||
------------------------------------------
|
||||
|
||||
Some methods previously accepted an optional list of species as a filter, e.g.::
|
||||
|
||||
>>> gas.massFractions(['OH','H'])
|
||||
|
||||
This is not compatible with the Python "property" syntax, so the following
|
||||
alternative is used instead::
|
||||
|
||||
>>> gas['OH','H2'].Y
|
||||
array([ 0., 1.])
|
||||
|
||||
This works for any property which returns a value for each species, and works
|
||||
with species names, indices, and index ranges::
|
||||
|
||||
>>> gas[1,2,6].partial_molar_cp
|
||||
array([ 20786.15525072, 21900.30946418, 34929.99146762])
|
||||
|
||||
>>> gas[3:6].species_names
|
||||
['O2', 'OH', 'H2O']
|
||||
|
||||
Furthermore, the "sliced" object itself can be saved and used without needing
|
||||
to specify the species list again::
|
||||
|
||||
>>> reactants = gas['H2','O2']
|
||||
>>> reactants.X
|
||||
array([ 1., 0.])
|
||||
|
||||
Transport Models
|
||||
----------------
|
||||
|
||||
The old method for setting the transport model, `switchTransportModel` has been
|
||||
replaced with the `transport_model` property. To use the multicomponent
|
||||
transport model::
|
||||
|
||||
>>> gas.transport_model = 'Multi'
|
||||
|
||||
Note that unlike the previous implementation, only one transport model can be
|
||||
associated with a `Solution` object at a time, so there is a larger cost with
|
||||
switching models. If you need to alternate between transport models, it is
|
||||
generally better to use two different `Solution` objects.
|
||||
|
||||
Reactor Networks
|
||||
----------------
|
||||
|
||||
As with the `Solution` class, properties are now used to get and set most
|
||||
parameters of reactors, flow devices, walls, etc. The following old code::
|
||||
|
||||
>>> Y = reactor.massFractions()
|
||||
>>> X = reactor.contents().moleFractions()
|
||||
>>> wall.setArea(2.0)
|
||||
|
||||
>>> net.setTolerances(1e-8, 1e-14)
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> Y = reactor.Y
|
||||
>>> X = reactor.thermo.X
|
||||
>>> wall.area = 2.0
|
||||
|
||||
>>> net.rtol = 1e-8
|
||||
>>> net.atol = 1e-14
|
||||
|
||||
Time-varying parameters have not been replaced with properties, since they
|
||||
need to be evaluated at a particular time.
|
||||
|
||||
Elimination of the ``Func`` Module
|
||||
----------------------------------
|
||||
|
||||
The ``Func`` module is no longer necessary, as the Cython module allows any
|
||||
callable Python object (lambda, function, or class) to be used in places where
|
||||
a function of a single variable are needed. For example, to set the velocity
|
||||
of a wall as a function of time, the following are equivalent::
|
||||
|
||||
>>> wall.set_velocity(lambda t: np.cos(3*t))
|
||||
|
||||
>>> def myfunc(z):
|
||||
... return np.cos(3*z)
|
||||
>>> wall.set_velocity(myfunc)
|
||||
|
||||
One-Dimensional Reacting Flows
|
||||
------------------------------
|
||||
|
||||
As elsewhere, the ``set`` method has been eliminated. The following old usage::
|
||||
|
||||
>>> f.fuel_inlet.set(massflux=mdot_f,
|
||||
>>> mole_fractions=comp_f,
|
||||
>>> temperature=tin_f)
|
||||
|
||||
>>> f.set(energy = 'off')
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> f.fuel_inlet.mdot = mdot_f
|
||||
>>> f.fuel_inlet.X = comp_f
|
||||
>>> f.fuel_inlet.T = tin_f
|
||||
|
||||
>>> f.energy_enabled = False
|
||||
|
||||
However, the methods for setting tolerances and refinement criteria have been
|
||||
retained in slightly modified forms. The following::
|
||||
|
||||
>>> f.set(tol=tol_ss, tol_time=tol_ts)
|
||||
>>> f.setRefineCriteria(ratio=4, slope=0.2, curve=0.3, prune=0.04)
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> f.flame.set_steady_tolerances(default=tol_ss)
|
||||
>>> f.flame.set_transient_tolerances(default=tol_ts)
|
||||
>>> f.set_refine_criteria(ratio=4, slope=0.2, curve=0.3, prune=0.04)
|
||||
|
||||
To change the transport model and enable calculation of the Soret diffusion
|
||||
term, the following::
|
||||
|
||||
>>> gas.addTransportModel('Multi')
|
||||
>>> gas.switchTransportModel('Multi')
|
||||
>>> f.flame.setTransportModel(gas)
|
||||
>>> f.flame.enableSoret()
|
||||
|
||||
should be replaced with::
|
||||
|
||||
>>> f.transport_model = 'Multi'
|
||||
>>> f.soret_enabled = True
|
||||
|
|
@ -31,18 +31,41 @@ ImpingingJet
|
|||
^^^^^^^^^^^^
|
||||
.. autoclass:: ImpingingJet(gas, grid=None, width=None)
|
||||
|
||||
IonFreeFlame
|
||||
^^^^^^^^^^^^
|
||||
.. autoclass:: IonFreeFlame(gas, grid=None, width=None)
|
||||
|
||||
.. autoattribute:: E
|
||||
.. autoattribute:: electric_field_enabled
|
||||
.. automethod:: solve
|
||||
|
||||
IonBurnerFlame
|
||||
^^^^^^^^^^^^^^
|
||||
.. autoclass:: IonBurnerFlame(gas, grid=None, width=None)
|
||||
|
||||
.. autoattribute:: E
|
||||
.. autoattribute:: electric_field_enabled
|
||||
.. automethod:: solve
|
||||
|
||||
Flow Domains
|
||||
------------
|
||||
|
||||
IdealGasFlow
|
||||
^^^^^^^^^^^^
|
||||
.. autoclass:: IdealGasFlow(thermo)
|
||||
:inherited-members:
|
||||
|
||||
IonFlow
|
||||
^^^^^^^
|
||||
.. autoclass:: IonFlow(thermo)
|
||||
|
||||
FreeFlow
|
||||
^^^^^^^^
|
||||
.. autoclass:: FreeFlow(thermo)
|
||||
:inherited-members:
|
||||
|
||||
AxisymmetricStagnationFlow
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.. autoclass:: AxisymmetricStagnationFlow(thermo)
|
||||
:inherited-members:
|
||||
|
||||
Boundaries
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -1,442 +0,0 @@
|
|||
.. py:currentmodule:: cantera
|
||||
|
||||
Tutorial
|
||||
========
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
Start by opening an interactive Python session, e.g. by running `IPython
|
||||
<http://ipython.org/>`_. Import the Cantera Python module and NumPy by running::
|
||||
|
||||
>>> import cantera as ct
|
||||
>>> import numpy as np
|
||||
|
||||
When using Cantera, the first thing you usually need is an object representing
|
||||
some phase of matter. Here, we'll create a gas mixture::
|
||||
|
||||
>>> gas1 = ct.Solution('gri30.xml')
|
||||
|
||||
To view the state of the mixture, *call* the `gas1` object as if it were a
|
||||
function::
|
||||
|
||||
>>> gas1()
|
||||
|
||||
You should see something like this::
|
||||
|
||||
gri30:
|
||||
|
||||
temperature 300 K
|
||||
pressure 101325 Pa
|
||||
density 0.0818891 kg/m^3
|
||||
mean mol. weight 2.01588 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy 26470.1 5.336e+04 J
|
||||
internal energy -1.21087e+06 -2.441e+06 J
|
||||
entropy 64913.9 1.309e+05 J/K
|
||||
Gibbs function -1.94477e+07 -3.92e+07 J
|
||||
heat capacity c_p 14311.8 2.885e+04 J/K
|
||||
heat capacity c_v 10187.3 2.054e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
H2 1 1 -15.7173
|
||||
[ +52 minor] 0 0
|
||||
|
||||
What you have just done is to create an object, `gas1` that implements GRI-
|
||||
Mech 3.0, the 53-species, 325-reaction natural gas combustion mechanism
|
||||
developed by Gregory P. Smith, David M. Golden, Michael Frenklach, Nigel W.
|
||||
Moriarty, Boris Eiteneer, Mikhail Goldenberg, C. Thomas Bowman, Ronald K.
|
||||
Hanson, Soonho Song, William C. Gardiner, Jr., Vitali V. Lissianski, and
|
||||
Zhiwei Qin. See http://www.me.berkeley.edu/gri_mech/ for more information.
|
||||
|
||||
The `gas1` object has properties you would expect for a gas mixture - it has a
|
||||
temperature, a pressure, species mole and mass fractions, etc. As we'll soon
|
||||
see, it has many more properties.
|
||||
|
||||
The summary of the state of `gas1` printed above shows that new objects
|
||||
created from the `gri30.xml` input file start out with a temperature of 300 K,
|
||||
a pressure of 1 atm, and have a composition that consists of only one species,
|
||||
in this case hydrogen. There is nothing special about H2 - it just happens to
|
||||
be the first species listed in the input file defining GRI-Mech 3.0. In
|
||||
general, whichever species is listed first will initially have a mole fraction
|
||||
of 1.0, and all of the others will be zero.
|
||||
|
||||
Setting the State
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The state of the object can easily be changed. For example::
|
||||
|
||||
>>> gas1.TP = 1200, 101325
|
||||
|
||||
sets the temperature to 1200 K and the pressure to 101325 Pa (Cantera always
|
||||
uses SI units). After this statement, calling ``gas1()`` results in::
|
||||
|
||||
gri30:
|
||||
|
||||
temperature 1200 K
|
||||
pressure 101325 Pa
|
||||
density 0.0204723 kg/m^3
|
||||
mean mol. weight 2.01588 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy 1.32956e+07 2.68e+07 J
|
||||
internal energy 8.34619e+06 1.682e+07 J
|
||||
entropy 85227.6 1.718e+05 J/K
|
||||
Gibbs function -8.89775e+07 -1.794e+08 J
|
||||
heat capacity c_p 15377.9 3.1e+04 J/K
|
||||
heat capacity c_v 11253.4 2.269e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
H2 1 1 -17.9775
|
||||
[ +52 minor] 0 0
|
||||
|
||||
Notice that the temperature has been changed as requested, but the pressure
|
||||
has changed too. The density and composition have not.
|
||||
|
||||
Thermodynamics generally requires that *two* properties in addition to
|
||||
composition information be specified to fix the intensive state of a substance
|
||||
(or mixture). The state of the mixture can be set using several combinations
|
||||
of two properties. The following are all equivalent::
|
||||
|
||||
>>> gas1.TP = 1200, 101325 # temperature, pressure
|
||||
>>> gas1.TD = 1200, 0.0204723 # temperature, density
|
||||
>>> gas1.HP = 1.32956e7, 101325 # specific enthalpy, pressure
|
||||
>>> gas1.UV = 8.34619e6, 1/0.0204723 # specific internal energy, specific volume
|
||||
>>> gas1.SP = 85227.6, 101325 # specific entropy, pressure
|
||||
>>> gas1.SV = 85227.6, 1/0.0204723 # specific entropy, specific volume
|
||||
|
||||
In each case, the values of the extensive properties must be entered *per unit
|
||||
mass*.
|
||||
|
||||
Properties may be read independently or together::
|
||||
|
||||
>>> gas1.T
|
||||
1200.0
|
||||
>>> gas1.h
|
||||
13295567.68
|
||||
>>> gas1.UV
|
||||
(8346188.494954427, 48.8465747765848)
|
||||
|
||||
The composition can be set in terms of either mole fractions (``X``) or mass
|
||||
fractions (``Y``)::
|
||||
|
||||
>>> gas1.X = 'CH4:1, O2:2, N2:7.52'
|
||||
|
||||
Mass and mole fractions can also be set using `dict` objects, for cases where
|
||||
the composition is stored in a variable or being computed::
|
||||
|
||||
>>> phi = 0.8
|
||||
>>> gas1.X = {'CH4':1, 'O2':2/phi, 'N2':2*3.76/phi}
|
||||
|
||||
When the composition alone is changed, the temperature and density are held
|
||||
constant. This means that the pressure and other intensive properties will
|
||||
change. The composition can also be set in conjunction with the intensive
|
||||
properties of the mixture::
|
||||
|
||||
>>> gas1.TPX = 1200, 101325, 'CH4:1, O2:2, N2:7.52'
|
||||
>>> gas1()
|
||||
|
||||
results in::
|
||||
|
||||
gri30:
|
||||
|
||||
temperature 1200 K
|
||||
pressure 101325 Pa
|
||||
density 0.280629 kg/m^3
|
||||
mean mol. weight 27.6332 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy 861943 2.382e+07 J
|
||||
internal energy 500879 1.384e+07 J
|
||||
entropy 8914.3 2.463e+05 J/K
|
||||
Gibbs function -9.83522e+06 -2.718e+08 J
|
||||
heat capacity c_p 1397.26 3.861e+04 J/K
|
||||
heat capacity c_v 1096.38 3.03e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
O2 0.190114 0.220149 -28.7472
|
||||
CH4 0.095057 0.0551863 -35.961
|
||||
N2 0.714829 0.724665 -25.6789
|
||||
[ +50 minor] 0 0
|
||||
|
||||
The composition above was specified using a string. The format is a comma-
|
||||
separated list of ``<species name>:<relative mole numbers>`` pairs. The mole
|
||||
numbers will be normalized to produce the mole fractions, and therefore they
|
||||
are "relative" mole numbers. Mass fractions can be set in this way too by
|
||||
changing ``X`` to ``Y`` in the above statements.
|
||||
|
||||
The composition can also be set using an array, which must have the same size
|
||||
as the number of species. For example, to set all 53 mole fractions to the
|
||||
same value, do this::
|
||||
|
||||
>>> gas1.X = np.ones(53) # NumPy array of 53 ones
|
||||
|
||||
Or, to set all the mass fractions to equal values::
|
||||
|
||||
>>> gas1.Y = np.ones(53)
|
||||
|
||||
When setting the state, you can control what properties are held constant by
|
||||
passing the special value `None` to the property setter. For example, to
|
||||
change the specific volume to 2.1 m^3/kg while holding entropy constant::
|
||||
|
||||
>>> gas1.SV = None, 2.1
|
||||
|
||||
Or to set the mass fractions while holding temperature and pressure constant::
|
||||
|
||||
>>> gas1.TPX = None, None, 'CH4:1.0, O2:0.5'
|
||||
|
||||
Working with a Subset of Species
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Many properties of a `Solution` provide values for each species present in the
|
||||
phase. If you want to get values only for a subset of these species, you can use
|
||||
Python's "slicing" syntax to select data for just the species of interest. To
|
||||
get the mole fractions of just the major species in `gas1`, in the order
|
||||
specified, you can write:
|
||||
|
||||
>>> Xmajor = gas1['CH4','O2','CO2','H2O','N2'].X
|
||||
|
||||
If you want to use the same set of species repeatedly, you can keep a reference
|
||||
to the sliced phase object:
|
||||
|
||||
>>> major = gas1['CH4','O2','CO2','H2O','N2']
|
||||
>>> cp_major = major.partial_molar_cp
|
||||
>>> wdot_major = major.net_production_rates
|
||||
|
||||
The slice object and the original object share the same internal state, so
|
||||
modifications to one will affect the other.
|
||||
|
||||
Working With Mechanism Files
|
||||
----------------------------
|
||||
|
||||
In previous example, we created an object that models an ideal gas mixture
|
||||
with the species and reactions of GRI-Mech 3.0, using the ``gri30.xml`` input
|
||||
file included with Cantera. This is a "pre-processed" XML input file written
|
||||
in a format that is easy for Cantera to parse. Cantera also supports an input
|
||||
file format that is easier to write, called *CTI*. Several reaction mechanism
|
||||
files in this format are included with Cantera, including ones that model
|
||||
high- temperature air, a hydrogen/oxygen reaction mechanism, and a few surface
|
||||
reaction mechanisms. These files are usually located in the ``data``
|
||||
subdirectory of the Cantera installation directory, e.g. ``C:\\Program
|
||||
Files\\Cantera\\data`` on Windows or ``/usr/local/cantera/data/`` on
|
||||
Unix/Linux/Mac OS X machines, depending on how you installed Cantera and the
|
||||
options you specified.
|
||||
|
||||
If for some reason Cantera has difficulty finding where these files are on your
|
||||
system, set environment variable ``CANTERA_DATA`` to the directory or
|
||||
directories (separated using ``;`` on Windows or ``:`` on other operating
|
||||
systems) where they are located. Alternatively, you can call function
|
||||
`add_directory` to add a directory to the Cantera search path::
|
||||
|
||||
>>> ct.add_directory('/usr/local/cantera/my_data_files')
|
||||
|
||||
Cantera input files are plain text files, and can be created with any text
|
||||
editor. See the document :ref:`sec-defining-phases` for more information.
|
||||
|
||||
A Cantera input file may contain more than one phase specification, or may
|
||||
contain specifications of interfaces (surfaces). Here we import definitions of
|
||||
two bulk phases and the interface between them from file ``diamond.cti``::
|
||||
|
||||
>>> gas2 = ct.Solution('diamond.cti', 'gas')
|
||||
>>> diamond = ct.Solution('diamond.cti', 'diamond')
|
||||
>>> diamond_surf = ct.Interface('diamond.cti' , 'diamond_100',
|
||||
[gas2, diamond])
|
||||
|
||||
Note that the bulk (i.e., 3D or homogeneous) phases that participate in the
|
||||
surface reactions must also be passed as arguments to `Interface`.
|
||||
|
||||
Converting CK-format files
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`sec-ck-format-conversion` in the :ref:`sec-input-files` documentation.
|
||||
|
||||
|
||||
Getting Help
|
||||
------------
|
||||
|
||||
In addition to the Sphinx-generated :ref:`sec-cython-documentation`,
|
||||
documentation of the Python classes and their methods can be accessed from
|
||||
within the Python interpreter as well.
|
||||
|
||||
Suppose you have created a Cantera object and want to know what methods are
|
||||
available for it, and get help on using the methods::
|
||||
|
||||
>>> g = ct.Solution('gri30.xml')
|
||||
|
||||
To get help on the Python class that this object is an instance of::
|
||||
|
||||
>>> help(g)
|
||||
|
||||
For a simple list of the properties and methods of this object::
|
||||
|
||||
>>> dir(g)
|
||||
|
||||
To get help on a specific method, e.g. the ``species_index`` method::
|
||||
|
||||
>>> help(g.species_index)
|
||||
|
||||
For properties, getting the documentation is slightly trickier, as the usual
|
||||
method will give you the help for the *result*, e.g.::
|
||||
|
||||
>>> help(g.T)
|
||||
|
||||
will provide help on Python's ``float`` class. To get the help for the
|
||||
temperature property, ask for the attribute of the class object itself::
|
||||
|
||||
>>> help(g.__class__.T)
|
||||
|
||||
If you are using the IPython shell, help can also be obtained using the `?`
|
||||
syntax::
|
||||
|
||||
In[1]: g.species_index?
|
||||
|
||||
Chemical Equilibrium
|
||||
--------------------
|
||||
|
||||
To set a gas mixture to a state of chemical equilibrium, use the equilibrate
|
||||
method::
|
||||
|
||||
>>> import cantera as ct
|
||||
>>> g = ct.Solution('gri30.xml')
|
||||
>>> g.TPX = 300.0, ct.one_atm, 'CH4:0.95,O2:2,N2:7.52'
|
||||
>>> g.equilibrate('TP')
|
||||
|
||||
The above statement sets the state of object ``g`` to the state of chemical
|
||||
equilibrium holding temperature and pressure fixed. Alternatively, the
|
||||
specific enthalpy and pressure can be held fixed::
|
||||
|
||||
>>> g.TPX = 300.0, ct.one_atm, 'CH4:0.95,O2:2,N2:7.52'
|
||||
>>> g.equilibrate('HP')
|
||||
|
||||
Other options are:
|
||||
|
||||
- 'UV' fixed specific internal energy and specific volume
|
||||
- 'SV' fixed specific entropy and specific volume
|
||||
- 'SP' fixed specific entropy and pressure
|
||||
|
||||
How can you tell if ``equilibrate`` has correctly found the chemical equilibrium
|
||||
state? One way is verify that the net rates of progress of all reversible
|
||||
reactions are zero. Here is the code to do this:
|
||||
|
||||
>>> g.TPX = 300.0, ct.one_atm, 'CH4:0.95,O2:2,N2:7.52'
|
||||
>>> g.equilibrate('HP')
|
||||
|
||||
>>> rf = g.forward_rates_of_progress
|
||||
>>> rr = g.reverse_rates_of_progress
|
||||
>>> for i in range(g.n_reactions):
|
||||
>>> if g.is_reversible(i) and rf[i] != 0.0:
|
||||
>>> print(' %4i %10.4g ' % (i, (rf[i] - rr[i])/rf[i]))
|
||||
|
||||
If the magnitudes of the numbers in this list are all very small, then each
|
||||
reversible reaction is very nearly equilibrated, which only occurs if the gas
|
||||
is in chemical equilibrium.
|
||||
|
||||
You might be wondering how ``equilibrate`` works. (Then again, you might not).
|
||||
Method ``equilibrate`` invokes Cantera's chemical equilibrium solver, which uses
|
||||
an element potential method. The element potential method is one of a class of
|
||||
equivalent *nonstoichiometric* methods that all have the characteristic that
|
||||
the problem reduces to solving a set of M nonlinear algebraic equations, where
|
||||
M is the number of elements (not species). The so-called *stoichiometric*
|
||||
methods, on the other hand, (including Gibbs minimization), require solving K
|
||||
nonlinear equations, where K is the number of species (usually K >> M). See
|
||||
Smith and Missen, "Chemical Reaction Equilibrium Analysis" for more
|
||||
information on the various algorithms and their characteristics.
|
||||
|
||||
Cantera uses a damped Newton method to solve these equations, and does a few
|
||||
other things to generate a good starting guess and to produce a reasonably
|
||||
robust algorithm. If you want to know more about the details, look at the on-
|
||||
line documented source code of Cantera C++ class 'ChemEquil.h'.
|
||||
|
||||
Chemical Kinetics
|
||||
-----------------
|
||||
|
||||
`Solution` objects are also `Kinetics` objects, and provide all of the methods
|
||||
necessary to compute the thermodynamic quantities associated with each reaction,
|
||||
reaction rates, and species creation and destruction rates. They also provide
|
||||
methods to inspect the quantities that define each reaction such as the rate
|
||||
constants and the stoichiometric coefficients. The rate calculation functions
|
||||
are used extensively within Cantera's :ref:`reactor network model
|
||||
<sec-cython-zerodim>` and :ref:`1D flame model <sec-cython-onedim>`.
|
||||
|
||||
Information about individual reactions that is independent of the thermodynamic
|
||||
state can be obtained by accessing `Reaction` objects with the
|
||||
`Kinetics.reaction` method::
|
||||
|
||||
>>> g = ct.Solution('gri30.cti')
|
||||
>>> r = g.reaction(2) # get a Reaction object
|
||||
>>> r
|
||||
<ElementaryReaction: H2 + O <=> H + OH>
|
||||
|
||||
>>> r.reactants
|
||||
{'H2': 1.0, 'O': 1.0}
|
||||
>>> r.products
|
||||
{'H': 1.0, 'OH': 1.0}
|
||||
>>> r.rate
|
||||
Arrhenius(A=38.7, b=2.7, E=2.61918e+07)
|
||||
|
||||
If we are interested in only certain types of reactions, we can use this
|
||||
information to filter the full list of reactions to find the just the ones of
|
||||
interest. For example, here we find the indices of just those reactions which
|
||||
convert `CO` into `CO2`::
|
||||
|
||||
>>> II = [i for i,r in enumerate(g.reactions())
|
||||
if 'CO' in r.reactants and 'CO2' in r.products]
|
||||
>>> for i in II:
|
||||
... print(g.reaction(i).equation)
|
||||
CO + O (+M) <=> CO2 (+M)
|
||||
CO + O2 <=> CO2 + O
|
||||
CO + OH <=> CO2 + H
|
||||
CO + HO2 <=> CO2 + OH
|
||||
|
||||
(Actually, we should also include reactions where the reaction is written such
|
||||
that ``CO2`` is a reactant and ``CO`` is a product, but for this example, we'll
|
||||
just stick to this smaller set of reactions.) Now, let's set the composition to
|
||||
an interesting equilibrium state::
|
||||
|
||||
>>> g.TPX = 300, 101325, {'CH4':0.6, 'O2':1.0, 'N2':3.76}
|
||||
>>> g.equilibrate('HP')
|
||||
|
||||
We can verify that this is an equilibrium state by seeing that the net reaction
|
||||
rates are essentially zero::
|
||||
|
||||
>>> g.net_rates_of_progress[II]
|
||||
array([ 4.06576e-20, -5.50571e-21, 0.00000e+00, -4.91279e-20])
|
||||
|
||||
Now, let's see what happens if we decrease the temperature of the mixture::
|
||||
|
||||
>>> g.TP = g.T-100, None
|
||||
>>> g.net_rates_of_progress[II]
|
||||
array([ 3.18645e-05, 5.00490e-08, 1.05965e-01, 2.89503e-06])
|
||||
|
||||
All of the reaction rates are positive, favoring the formation of ``CO2`` from
|
||||
``CO``, with the third reaction, ``CO + OH <=> CO2 + H`` proceeding the fastest.
|
||||
If we look at the enthalpy change associated with each of these reactions::
|
||||
|
||||
>>> g.delta_enthalpy[II]
|
||||
array([ -5.33035e+08, -2.23249e+07, -8.76650e+07, -2.49170e+08])
|
||||
|
||||
we see that the change is negative in each case, indicating a net release of
|
||||
thermal energy. The total heat release rate can be computed either from the
|
||||
reaction rates::
|
||||
|
||||
>>> np.dot(g.net_rates_of_progress, g.delta_enthalpy)
|
||||
-58013370.720881931
|
||||
|
||||
or from the species production rates::
|
||||
|
||||
>>> np.dot(g.net_production_rates, g.partial_molar_enthalpies)
|
||||
-58013370.720881805
|
||||
|
||||
The contribution from just the selected reactions is:
|
||||
|
||||
>>> np.dot(g.net_rates_of_progress[II], g.delta_enthalpy[II])
|
||||
-9307123.2625651453
|
||||
|
||||
Or about 16% of the total heat release rate.
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
**************************
|
||||
Frequently Asked Questions
|
||||
**************************
|
||||
|
||||
Installation & Compilation
|
||||
--------------------------
|
||||
|
||||
**How do I install Cantera on Windows?**
|
||||
|
||||
Download the MSI installer for Cantera and the corresponding Python module
|
||||
from `SourceForge <https://sourceforge.net/projects/cantera/files/cantera/>`_.
|
||||
Choose between x86 and x64 based on the versions of Python and/or Matlab
|
||||
you want to work with. See :ref:`Windows Installation <sec-install-win>`
|
||||
for details.
|
||||
|
||||
**How do I install Cantera on Linux?**
|
||||
|
||||
For Ubuntu, packages for the current stable version of Cantera are available
|
||||
in a PPA. See :ref:`Ubuntu Installation <sec-install-ubuntu>` for details.
|
||||
|
||||
For other Linux distributions, download the source code (e.g.
|
||||
``cantera-2.1.1.tar.gz``) from `SourceForge
|
||||
<https://sourceforge.net/projects/cantera/files/cantera/>`_ and follow the
|
||||
instructions in the :ref:`sec-compiling`.
|
||||
|
||||
**How do I install Cantera on Mac OS X?**
|
||||
|
||||
Cantera can be installed using Homebrew. See :ref:`Mac OS X Installation
|
||||
<sec-install-osx>` for details.
|
||||
|
||||
**What do I do if compiling Cantera fails?**
|
||||
|
||||
- Examine the output of the ``scons build`` command, especially anything
|
||||
identified as a ``WARNING`` or ``ERROR``. Check for discrepancies
|
||||
with your expected configuration (e.g. not finding SUNDIALS even though
|
||||
you have it installed).
|
||||
- Check the contents of ``cantera.conf`` to make sure they are correct.
|
||||
- If any of the configuration tests (``Checking for...``) fail unexpectedly,
|
||||
look at the contents of ``config.log`` to determine the reason.
|
||||
- If none of these help identify the cause of the failure, consider asking
|
||||
for help on the Cantera Users' Group. If you decide to make a post, please
|
||||
include the following information:
|
||||
|
||||
* The contents of ``cantera.conf`` and ``config.log``
|
||||
* The output of the ``scons build`` and ``scons build dump`` commands
|
||||
(you can direct this output to a file by running ``scons build >buildlog.txt 2>&1``)
|
||||
* The exact version of Cantera you are trying to compile, and how it was
|
||||
obtained (i.e. downloaded source tarball or the specific Git commit)
|
||||
* Your operating system, compiler versions, and the versions of any other
|
||||
relevant software.
|
||||
|
||||
**How do I debug issues with the SCons build system?**
|
||||
|
||||
Sometimes, it is helpful to see all of the internal variables defined by
|
||||
SCons, either automatically or by the Cantera build scripts. To do this, add
|
||||
``dump`` to your SCons command line. For example::
|
||||
|
||||
$ scons build dump
|
||||
|
||||
will show the variables that would be set during the ``build`` step. Note
|
||||
that in this case, the ``build`` step will not be executed.
|
||||
|
||||
Alternatively, it is also possible to run SCons through the Python debugger, and set a breakpoint in the ``SConstruct`` file. For example::
|
||||
|
||||
$ scons --debug=pdb build
|
||||
(Pdb) b /full/path/to/SConstruct:33
|
||||
(Pdb) cont
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
**Which Cantera interface should I use?**
|
||||
|
||||
If you're new to Cantera, the best interface to get started with is
|
||||
probably the Python interface. It offers most of the features of the
|
||||
C++ core in a much more flexible environment. Since all of the
|
||||
calculations are still done in C++, there is very little performance
|
||||
penalty to using the high-level language interfaces.
|
||||
|
||||
**Where can I find examples of how to use Cantera?**
|
||||
|
||||
Cantera is distributed with many examples for the Python and Matlab
|
||||
interfaces, and a smaller number of examples for the C++ and Fortran
|
||||
interfaces. The Matlab, C++, and Fortran examples should be
|
||||
installed in the ``samples`` subdirectory of the Cantera installation
|
||||
directory, or they can be found in the ``samples`` subdirectory of the
|
||||
Cantera source directory.
|
||||
|
||||
Examples for the Python interface can be found in the ``examples``
|
||||
subdirectory of the Cantera Python module installation directory, or in
|
||||
the ``interfaces/cython/cantera/examples`` subdirectory of the Cantera
|
||||
source directory.
|
||||
|
||||
**How should I cite Cantera?**
|
||||
|
||||
The recommended citation for Cantera is as follows:
|
||||
|
||||
David G. Goodwin, Harry K. Moffat, and Raymond L. Speth. *Cantera: An object-
|
||||
oriented software toolkit for chemical kinetics, thermodynamics, and
|
||||
transport processes*. http://www.cantera.org, 2017. Version 2.3.0.
|
||||
doi:10.5281/zenodo.170284
|
||||
|
||||
The following BibTeX entry may also be used::
|
||||
|
||||
@Misc{Cantera,
|
||||
author = "David G. Goodwin and Harry K. Moffat and Raymond L. Speth",
|
||||
title = "Cantera: An Object-oriented Software Toolkit for Chemical
|
||||
Kinetics, Thermodynamics, and Transport Processes",
|
||||
year = 2017,
|
||||
note = "Version 2.3.0",
|
||||
howpublished = "\url{http://www.cantera.org}"
|
||||
doi = {10.5281/zenodo.170284}
|
||||
}
|
||||
|
||||
If you are using a different version of Cantera, update the ``version`` and
|
||||
``year`` fields accordingly.
|
||||
|
||||
|
||||
Support and Bug Reporting
|
||||
-------------------------
|
||||
|
||||
**What should I do if I think I've found a bug in Cantera?**
|
||||
|
||||
- Check to see if you're using the most recent version of Cantera, and
|
||||
upgrade if not.
|
||||
- Check the `Issue Tracker
|
||||
<https://github.com/Cantera/cantera/issues>`_ to see if the issue
|
||||
has already been reported.
|
||||
- Try to generate a `minimal, complete, and verifiable example
|
||||
<http://stackoverflow.com/help/mcve>`_ that demonstrates the observed bug.
|
||||
- Create a new issue on the tracker. Include as much information as
|
||||
possible about your system configuration (operating system, compiler
|
||||
versions, Python versions, installation method, etc.)
|
||||
|
||||
**What information should I include in my bug report?**
|
||||
|
||||
- The version of Cantera are you using, and how you installed it
|
||||
- The operating system you are using
|
||||
- If you compiled Cantera, what compiler you used, and what compilation
|
||||
options you specified
|
||||
- The version of Python or Matlab are you using, if applicable
|
||||
- The necessary *input* to generate the reported behavior
|
||||
- The full text of any error message you receive
|
||||
|
||||
**What should I do if I need help using Cantera?**
|
||||
|
||||
You can join the `Cantera Users' Group
|
||||
<https://groups.google.com/forum/#!forum /cantera-users>`_ on Google
|
||||
Groups and ask a question there. Please use the search feature before
|
||||
posting to see if your question has been answered before. This group is
|
||||
moderated, so it may take some time for your posts to appear if you are a
|
||||
new member.
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
.. default-role:: math
|
||||
|
||||
.. py:currentmodule:: cantera
|
||||
|
||||
**********************
|
||||
One-Dimensional Flames
|
||||
**********************
|
||||
|
||||
Cantera includes a set of models for representing steady-state, quasi-one-
|
||||
dimensional reacting flows, which can be used to simulate a number of common
|
||||
flames, such as:
|
||||
|
||||
- freely-propagating premixed laminar flames
|
||||
- burner-stabilized premixed flames
|
||||
- counterflow diffusion flames
|
||||
- counterflow (strained) premixed flames
|
||||
|
||||
Additional capabilities include simulation of surface reactions, which can be
|
||||
used to represent processes such as combustion on a catalytic surface or
|
||||
chemical vapor deposition processes.
|
||||
|
||||
All of these configurations are simulated using a common set of governing
|
||||
equations within a 1D "flow" domain, with the differences between the models
|
||||
being represented by differences in the boundary conditions applied. Here, we
|
||||
describe the governing equations and the various boundary conditions which can
|
||||
be applied.
|
||||
|
||||
Stagnation Flow Governing Equations
|
||||
===================================
|
||||
|
||||
Cantera models flames which are stabilized in an axisymmetric stagnation flow,
|
||||
and computes the solution along the stagnation streamline (`r=0`), using a
|
||||
similarity solution to reduce the three-dimensional governing equations to a
|
||||
single dimension.
|
||||
|
||||
The governing equations for a steady axisymmetric stagnation flow follow those
|
||||
derived in Section 6.2 of [KCG2003]_:
|
||||
|
||||
*Continuity*:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{\partial\rho u}{\partial z} + 2 \rho V = 0
|
||||
|
||||
*Radial momentum*:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho u \frac{\partial V}{\partial z} + \rho V^2 =
|
||||
- \Lambda
|
||||
+ \frac{\partial}{\partial z}\left(\mu \frac{\partial V}{\partial z}\right)
|
||||
|
||||
|
||||
*Energy*:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho c_p u \frac{\partial T}{\partial z} =
|
||||
\frac{\partial}{\partial z}\left(\lambda \frac{\partial T}{\partial z}\right)
|
||||
- \sum_k j_k c_{p,k} \frac{\partial T}{\partial z}
|
||||
- \sum_k h_k W_k \dot{\omega}_k
|
||||
|
||||
*Species*:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho u \frac{\partial Y_k}{\partial z} = - \frac{\partial j_k}{\partial z}
|
||||
+ W_k \dot{\omega}_k
|
||||
|
||||
where `\rho` is the density, `u` is the axial velocity, `v` is the radial
|
||||
velocity, `V = v/r` is the scaled radial velocity, `\Lambda` is the pressure
|
||||
eigenvalue (independent of `z`), `\mu` is the dynamic viscosity, `c_p` is the
|
||||
heat capacity at constant pressure, `T` is the temperature, `\lambda` is the
|
||||
thermal conductivity, `Y_k` is the mass fraction of species `k`, `j_k` is the
|
||||
diffusive mass flux of species `k`, `c_{p,k}` is the specific heat capacity of
|
||||
species `k`, `h_k` is the enthalpy of species `k`, `W_k` is the molecular weight
|
||||
of species `k`, and `\dot{\omega}_k` is the molar production rate of species
|
||||
`k`.
|
||||
|
||||
The tangential velocity `w` has been assumed to be zero, and the fluid has been
|
||||
assumed to behave as an ideal gas.
|
||||
|
||||
To help in the solution of the discretized problem, it is convenient to write a
|
||||
differential equation for the scalar `\Lambda`:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{d\Lambda}{dz} = 0
|
||||
|
||||
Diffusive Fluxes
|
||||
----------------
|
||||
|
||||
The species diffusive mass fluxes `j_k` are computed according to either a
|
||||
mixture-averaged or multicomponent formulation. If the mixture-averaged
|
||||
formulation is used, the calculation performed is:
|
||||
|
||||
.. math::
|
||||
|
||||
j_k^* = \rho \frac{W_k}{\overline{W}} D_{k,m} \frac{\partial X_k}{\partial z}
|
||||
|
||||
j_k = j_k^* - Y_k \sum_i j_i^*
|
||||
|
||||
where `\overline{W}` is the mean molecular weight of the mixture, `D_{k,m}` is the
|
||||
mixture-averaged diffusion coefficient for species `k`, and `X_k` is the mole
|
||||
fraction for species `k`. The diffusion coefficients used here are those
|
||||
computed by the method :ct:`GasTransport::getMixDiffCoeffs`. The correction
|
||||
applied by the second equation ensures that the sum of the mass fluxes is zero,
|
||||
a condition which is not inherently guaranteed by the mixture-averaged
|
||||
formulation.
|
||||
|
||||
When using the multicomponent formulation, the mass fluxes are computed
|
||||
according to:
|
||||
|
||||
.. math::
|
||||
|
||||
j_k = \frac{\rho W_k}{\overline{W}^2} \sum_i W_i D_{ki} \frac{\partial X_i}{\partial z}
|
||||
- \frac{D_k^T}{T} \frac{\partial T}{\partial z}
|
||||
|
||||
where `D_{ki}` is the multicomponent diffusion coefficient and `D_k^T` is the
|
||||
Soret diffusion coefficient (used only if calculation of this term is
|
||||
specifically enabled).
|
||||
|
||||
Boundary Conditions
|
||||
===================
|
||||
|
||||
Inlet boundary
|
||||
--------------
|
||||
|
||||
For a boundary located at a point `z_0` where there is an inflow, values are
|
||||
supplied for the temperature `T_0`, the species mass fractions `Y_{k,0}` the
|
||||
scaled radial velocity `V_0`, and the mass flow rate `\dot{m}_0` (except in the
|
||||
case of the freely-propagating flame).
|
||||
|
||||
The following equations are solved at the point `z = z_0`:
|
||||
|
||||
.. math::
|
||||
|
||||
T(z_0) = T_0
|
||||
|
||||
V(z_0) = V_0
|
||||
|
||||
\dot{m}_0 Y_{k,0} - j_k(z_0) - \rho(z_0) u(z_0) Y_k(z_0) = 0
|
||||
|
||||
If the mass flow rate is specified, we also solve:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho(z_0) u(z_0) = \dot{m}_0
|
||||
|
||||
Otherwise, we solve:
|
||||
|
||||
.. math::
|
||||
|
||||
\Lambda(z_0) = 0
|
||||
|
||||
Outlet boundary
|
||||
---------------
|
||||
|
||||
For a boundary located at a point `z_0` where there is an outflow, we solve:
|
||||
|
||||
.. math::
|
||||
|
||||
\Lambda(z_0) = 0
|
||||
|
||||
\left.\frac{\partial T}{\partial z}\right|_{z_0} = 0
|
||||
|
||||
\left.\frac{\partial Y_k}{\partial z}\right|_{z_0} = 0
|
||||
|
||||
V(z_0) = 0
|
||||
|
||||
|
||||
Symmetry boundary
|
||||
-----------------
|
||||
|
||||
For a symmetry boundary located at a point `z_0`, we solve:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho(z_0) u(z_0) = 0
|
||||
|
||||
\left.\frac{\partial V}{\partial z}\right|_{z_0} = 0
|
||||
|
||||
\left.\frac{\partial T}{\partial z}\right|_{z_0} = 0
|
||||
|
||||
j_k(z_0) = 0
|
||||
|
||||
Reacting surface
|
||||
----------------
|
||||
|
||||
For a surface boundary located at a point `z_0` on which reactions may occur,
|
||||
the temperature `T_0` is specified. We solve:
|
||||
|
||||
.. math::
|
||||
|
||||
\rho(z_0) u(z_0) = 0
|
||||
|
||||
V(z_0) = 0
|
||||
|
||||
T(z_0) = T_0
|
||||
|
||||
j_k(z_0) + \dot{s}_k W_k = 0
|
||||
|
||||
where `\dot{s}_k` is the molar production rate of the gas-phase species `k` on
|
||||
the surface. In addition, the surface coverages `\theta_i` for each surface
|
||||
species `i` are computed such that `\dot{s}_i = 0`.
|
||||
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
.. [KCG2003] Kee, Coltrin, Glarborg: *Chemically Reacting Flow*.
|
||||
Wiley-Interscience, 2003
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
********
|
||||
Glossary
|
||||
********
|
||||
|
||||
The following abbreviations are used in Cantera, both in documentation and in
|
||||
the names of variables and classes:
|
||||
|
||||
* **CK**: Chemkin
|
||||
* **CT**: Cantera
|
||||
* **CTI**: Cantera input
|
||||
* **CTML**: Cantera markup language
|
||||
* **HKFT**: Helgeson-Kirkham-Flowers-Tanger
|
||||
* **HMW**: Harvie, Møller, and Weare
|
||||
* **IAPWS**: International Association for the Properties of Water and Steam
|
||||
* **MFTP**: Mixture fugacity ThermoPhase
|
||||
* **PDSS**: Pressure-dependent standard state
|
||||
* **RT**: Product of the gas constant (R) and the temperature
|
||||
* **SHE**: Single half-electrode
|
||||
* **SP**: "Surface Problem"
|
||||
* **SS**: Standard state
|
||||
* **SSTP**: SingleSpeciesTP (ThermoPhase)
|
||||
* **STIT**: SpeciesThermoInterpType
|
||||
* **VCS**: Villars Cruise Smith
|
||||
* **VPSS**: Variable pressure standard state
|
||||
* **VPSSTP**: variable pressure standard state ThermoPhase
|
||||
* **wrt**: with respect to
|
||||
|
|
@ -1,50 +1,17 @@
|
|||
.. Cantera documentation master file, created by
|
||||
sphinx-quickstart on Mon Mar 12 11:43:09 2012.
|
||||
|
||||
*******
|
||||
Welcome
|
||||
*******
|
||||
|
||||
Cantera is a suite of object-oriented software tools for problems involving
|
||||
chemical kinetics, thermodynamics, and/or transport processes.
|
||||
|
||||
Cantera provides types (or classes) of objects representing phases of
|
||||
matter, interfaces between these phases, reaction managers, time-dependent
|
||||
reactor networks, and steady one-dimensional reacting flows. Cantera is
|
||||
currently used for applications including combustion, detonations,
|
||||
electrochemical energy conversion and storage, fuel cells, batteries, aqueous
|
||||
electrolyte solutions, plasmas, and thin film deposition.
|
||||
|
||||
Cantera can be used from Python and Matlab, or in applications written
|
||||
in C++ and Fortran 90.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
These are the detailed API documentation pages for the Python and Matlab
|
||||
interfaces for Cantera. There is also documentation of the CTI input file
|
||||
format.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
faq
|
||||
Installation Instructions <install>
|
||||
Compiliation Instructions <compiling/index>
|
||||
language-interfaces
|
||||
cti/index
|
||||
reactors
|
||||
flames
|
||||
yaml/index
|
||||
cti/classes
|
||||
cython/index
|
||||
matlab/index
|
||||
cxx-guide/index
|
||||
glossary
|
||||
|
||||
Cantera Development Homepage <https://github.com/Cantera/cantera>
|
||||
|
||||
* **C++ Documentation**
|
||||
|
||||
* `Module Organization <../../doxygen/html/modules.html>`_
|
||||
* `Index of Classes <../../doxygen/html/classes.html>`_
|
||||
* `Deprecation List <../../doxygen/html/deprecated.html>`_
|
||||
|
||||
Indexes
|
||||
=======
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
||||
|
|
|
|||
|
|
@ -1,473 +0,0 @@
|
|||
.. _sec-install:
|
||||
|
||||
******************
|
||||
Installing Cantera
|
||||
******************
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. _sec-install-conda:
|
||||
|
||||
Conda
|
||||
=====
|
||||
|
||||
`Anaconda <https://www.continuum.io/downloads>`_ and `Miniconda
|
||||
<http://conda.pydata.org/miniconda.html>`_ are Python distributions for which
|
||||
Cantera is available through the `conda` package manager. Both distributions are
|
||||
available for Linux, OS X, and Windows. The base Anaconda distribution includes
|
||||
a large number of Python packages that are widely used in scientific
|
||||
applications. Miniconda is a minimal distribution, where all of the packages
|
||||
available in Anaconda can be installed using the package manager. Note that
|
||||
installing Cantera using conda will only provide the Cantera Python module. If
|
||||
you want to use the other Cantera interfaces, see the OS-specific installation
|
||||
options below.
|
||||
|
||||
For more details on how to use conda, see the `conda documentation
|
||||
<http://conda.pydata.org/docs/intro.html>`_.
|
||||
|
||||
**Option 1: Create a new environment for Cantera**
|
||||
|
||||
If you have just installed Anaconda or Miniconda, the following instructions
|
||||
will create a conda environment where you can use Cantera. For this example, the
|
||||
environment is named ``spam``. From the command line, run::
|
||||
|
||||
conda create -n spam -c cantera cantera ipython matplotlib
|
||||
|
||||
This will create an environment with Cantera, IPython, Matplotlib, and all their
|
||||
dependencies installed. Although conda can install a large set of packages by
|
||||
default, it is also possible to install packages such as Cantera that are
|
||||
maintained independently. These additional channels from which packages may be
|
||||
obtained are specified by adding the ``-c`` option in the ``install`` or
|
||||
``create`` commands. In this case, we want to install Cantera from the
|
||||
``cantera`` channel, so we add ``-c cantera`` and to tell conda to look at the
|
||||
``cantera`` channel in addition to the default channels.
|
||||
|
||||
If you are running Linux or OS X, you can then activate this environment by
|
||||
running::
|
||||
|
||||
source activate spam
|
||||
|
||||
If you are running Windows, the equivalent command is::
|
||||
|
||||
activate spam
|
||||
|
||||
**Option 2: Install Cantera in an existing environment**
|
||||
|
||||
First, activate your environment (assumed to be named ``baked_beans``; if you've
|
||||
forgotten the name of the conda environment you wanted to use, the command
|
||||
``conda env list`` can help). For Linux and OS X, this is done by running::
|
||||
|
||||
source activate baked_beans
|
||||
|
||||
For Windows users, the command is::
|
||||
|
||||
activate baked_beans
|
||||
|
||||
Then, install Cantera by running::
|
||||
|
||||
conda install -c cantera cantera
|
||||
|
||||
**Option 3: Install the development version of Cantera**
|
||||
|
||||
To install a recent development snapshot (i.e. an alpha or beta version) of
|
||||
Cantera in an existing environment, run::
|
||||
|
||||
conda install -c cantera/label/dev cantera
|
||||
|
||||
If you later want to revert back to the stable version, first remove and then
|
||||
reinstall Cantera::
|
||||
|
||||
conda remove cantera
|
||||
conda install -c cantera cantera
|
||||
|
||||
.. _sec-install-win:
|
||||
|
||||
Windows
|
||||
=======
|
||||
|
||||
Windows installers are provided for stable versions of Cantera. These
|
||||
installation instructions are for Cantera 2.3.0. Use these installers if you
|
||||
want to work with a copy of Python downloaded from `Python.org
|
||||
<https://www.python.org/>`_. If you are using Anaconda / Miniconda, see the
|
||||
directions :ref:`above <sec-install-conda>`.
|
||||
|
||||
1. **Choose your Python version and architecture**
|
||||
|
||||
- On Windows, Installers are provided for Python 2.7, Python 3.4, and Python
|
||||
3.5. Python 3.5 is recommended unless you need to use legacy code that does
|
||||
not work with Python 3. You can install multiple Cantera Python modules
|
||||
simultaneously.
|
||||
|
||||
- Cantera supports both 32- and 64- bit Python installations.
|
||||
|
||||
- You need choose the matching Cantera installer for your Python version and
|
||||
machine architecture.
|
||||
|
||||
- The rest of these instructions will refer to your chosen version of Python
|
||||
as *X.Y*.
|
||||
|
||||
- If you are using Matlab, you must use the same architecture for Cantera and
|
||||
Matlab. Matlab defaults to 64-bit if you are running a 64-bit operating
|
||||
system.
|
||||
|
||||
2. **Install Python**
|
||||
|
||||
- Go to `python.org <https://www.python.org/>`_.
|
||||
|
||||
- *64-bit*: Download the most recent "Windows X86-64 MSI Installer" for
|
||||
Python *X.Y*.
|
||||
- *32-bit*: Download the most recent "Windows x86 MSI Installer" for
|
||||
Python *X.Y*.
|
||||
|
||||
- Run the installer. The default installation options should be fine.
|
||||
|
||||
- Python is required in order to work with `.cti` input files even if you are
|
||||
not using the Python interface to Cantera.
|
||||
|
||||
- Cantera can also be used with alternative Python distributions such as the
|
||||
Enthought `Canopy <https://www.enthought.com/products/canopy/>`_
|
||||
distribution. These distributions will generally be based on the 64-bit
|
||||
version of Python 2.7, and will include Numpy as well as many other
|
||||
packages useful for scientific users.
|
||||
|
||||
3. **Install the Visual C++ Redistributable for Visual Studio 2015**
|
||||
|
||||
- If you are using Python 3.5, you can skip this step as this will have
|
||||
already been installed when you installed Python.
|
||||
|
||||
- Go to the `Microsoft Visual C++ Redistributable Download Page
|
||||
<https://www.microsoft.com/en-us/download/details.aspx?id=48145>`_.
|
||||
|
||||
- *64-bit*: Download ``vc_redist.x64.exe``
|
||||
- *32-bit*: Download ``vc_redist.x86.exe``
|
||||
|
||||
- Run the installer.
|
||||
|
||||
- If this package is not installed, you will encounter the following error
|
||||
when importing the `cantera` module::
|
||||
|
||||
ImportError: DLL load failed: The specified module could not be found.
|
||||
|
||||
4. **Install Numpy and optional Python packages**
|
||||
|
||||
- Go to the `Unofficial Windows Binaries for Python Extension Packages page
|
||||
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`_.
|
||||
|
||||
- Download the most recent release (distributed as a "wheel" archive) of the
|
||||
1.x series for Python *X.Y* that matches your Python architecture. In the
|
||||
filename, the digits after "cp" indicate the Python version, e.g.
|
||||
``numpy‑1.11.2+mkl‑cp35‑none‑win_amd64.whl`` is the installer for 64-bit
|
||||
Python 3.5. The Windows installers for Cantera 2.3.0 require Numpy 1.10 or
|
||||
newer.
|
||||
|
||||
- From an administrative command prompt, install the downloaded wheel using
|
||||
pip, e.g.::
|
||||
|
||||
c:\python35\scripts\pip.exe install "%USERPROFILE%\Downloads\numpy‑1.11.2+mkl‑cp35‑none‑win_amd64.whl"
|
||||
|
||||
- If you plan on using Cantera from Python, you may also want to install
|
||||
IPython (an advanced interactive Python interpreter) and Matplotlib (a
|
||||
plotting library), which are also available from the above link (note that
|
||||
you may also need to download additional dependencies for each of these
|
||||
packages). Matplotlib is required to run some of the Python examples.
|
||||
|
||||
5. **Remove old versions of Cantera**
|
||||
|
||||
- Use The Windows "Add/Remove Programs" interface
|
||||
|
||||
- Remove both the main Cantera package and the Python module.
|
||||
|
||||
- The Python module will be listed as "Python *X.Y* Cantera ..."
|
||||
|
||||
6. **Install Cantera**
|
||||
|
||||
- Go to the `Cantera Releases <https://github.com/Cantera/cantera/releases>`_
|
||||
page.
|
||||
|
||||
- *64-bit*: Download **Cantera-2.3.0-x64.msi** and
|
||||
**Cantera-Python-2.3.0-x64-pyX.Y.msi**.
|
||||
- *32-bit*: Download **Cantera-2.3.0-x86.msi** and
|
||||
**Cantera-Python-2.3.0-x86-pyX.Y.msi**.
|
||||
|
||||
- If you are only using the Python module, you do not need to download and
|
||||
install the base package.
|
||||
|
||||
- Run the installer(s).
|
||||
|
||||
7. **Configure Matlab** (optional)
|
||||
|
||||
- Set the environment variable ``PYTHON_CMD``
|
||||
|
||||
- From the *Start* menu (Windows 7) or the *Start* screen (Windows 8) type
|
||||
"edit environment" and select "Edit environment variables for your
|
||||
account".
|
||||
- Add a *New* variable with ``PYTHON_CMD`` as the *name* and the full path
|
||||
to the Python executable (e.g. ``C:\python35\python.exe``) as the
|
||||
*value*.
|
||||
- Setting ``PYTHON_CMD`` is not necessary if the path to ``python.exe`` is
|
||||
in your ``PATH`` (which can be set from the same configuration dialog).
|
||||
|
||||
- Launch Matlab
|
||||
|
||||
- Go to *File->Set Path...*
|
||||
|
||||
- Select *Add with Subfolders*
|
||||
|
||||
- Browse to the folder ``C:\Program Files\Cantera\matlab\toolbox``
|
||||
|
||||
- Select *Save*, then *Close*.
|
||||
|
||||
8. **Test the installation**
|
||||
|
||||
- Python::
|
||||
|
||||
import cantera
|
||||
gas = cantera.Solution('gri30.cti')
|
||||
h2o = cantera.PureFluid('liquidvapor.cti', 'water')
|
||||
|
||||
- Matlab::
|
||||
|
||||
gas = IdealGasMix('gri30.cti')
|
||||
h2o = Solution('liquidvapor.cti','water')
|
||||
|
||||
.. _sec-install-osx:
|
||||
|
||||
Mac OS X
|
||||
========
|
||||
|
||||
Cantera can be installed on OS X using either Homebrew, MacPorts, or Anaconda /
|
||||
Miniconda. If you are using Anaconda / Miniconda, see the directions
|
||||
:ref:`above <sec-install-conda>`. With Homebrew, the current stable, or
|
||||
development version of Cantera can be installed, and both the Python 2.7 and
|
||||
Python 3.x modules are available, as well as the Matlab toolbox. The MacPorts
|
||||
portfile supports the current stable version of Cantera and builds the Python
|
||||
2.7 module.
|
||||
|
||||
Homebrew
|
||||
---------
|
||||
These instructions have been tested on Mac OS X 10.9 (Mavericks) with Xcode 5.1
|
||||
and Mac OS X 10.10 (Yosemite) with Xcode 6.1. If you've used Homebrew before,
|
||||
you can skip any steps which have already been completed.
|
||||
|
||||
1. **Install Xcode and Homebrew**
|
||||
|
||||
- Install Xcode from the App Store
|
||||
|
||||
- From a Terminal, run::
|
||||
|
||||
sudo xcode-select --install
|
||||
sudo xcodebuild -license
|
||||
|
||||
and agree to the Xcode license agreement.
|
||||
|
||||
- Install `Homebrew <http://brew.sh/>`_ by running the following command in a
|
||||
Terminal::
|
||||
|
||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
|
||||
2. **Set up the compilation environment**
|
||||
|
||||
- Run the following commands::
|
||||
|
||||
brew tap homebrew/science
|
||||
brew update
|
||||
brew install python scons
|
||||
|
||||
- Verify that your path is set up to use Homebrew's version of Python by
|
||||
running::
|
||||
|
||||
which python
|
||||
|
||||
If this command does not print ``/usr/local/bin/python``, add the following
|
||||
to ``~/.bash_profile`` (creating this file if it doesn't already exist; you
|
||||
can use the command line editor ``nano`` to edit this file)::
|
||||
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
|
||||
and then run::
|
||||
|
||||
source ~/.bash_profile
|
||||
|
||||
- Install Python packages required to compile Cantera by running::
|
||||
|
||||
pip install numpy
|
||||
|
||||
Note that these packages are required even if you do not plan on using the
|
||||
Cantera Python 2 module.
|
||||
|
||||
- If you plan on using Cantera from Python, you may also want to install
|
||||
IPython (an advanced interactive Python interpreter) and Matplotlib (a
|
||||
plotting library). Matplotlib is required to run some of the Python
|
||||
examples::
|
||||
|
||||
pip install ipython matplotlib
|
||||
|
||||
- If you want to build the Cantera Python 3 module, run::
|
||||
|
||||
brew install python3
|
||||
pip3 install numpy cython
|
||||
|
||||
and, optionally::
|
||||
|
||||
pip3 install ipython matplotlib
|
||||
|
||||
3. **Compile and install Cantera**
|
||||
|
||||
* To compile and install Cantera using the default configuration, run::
|
||||
|
||||
brew install cantera
|
||||
|
||||
* The following options are supported:
|
||||
|
||||
``--HEAD``
|
||||
Installs the current development version of Cantera.
|
||||
|
||||
``--with-python3``
|
||||
Install the Python 3 module.
|
||||
|
||||
``--with-matlab=/Applications/MATLAB_R2014a.app/``
|
||||
Installs the Matlab toolbox (with the path modified to match your
|
||||
installed Matlab version)
|
||||
|
||||
``--without-sundials``
|
||||
Do not use an external SUNDIALS version to build Cantera. This option
|
||||
is set automatically when using Matlab.
|
||||
|
||||
``--without-test``
|
||||
NOT RECOMMENDED! Disable automatic testing of Cantera during the
|
||||
installation process.
|
||||
|
||||
* These options are specified as additional arguments to the ``brew install``
|
||||
command, e.g.::
|
||||
|
||||
brew install cantera --HEAD --with-python3
|
||||
|
||||
* If you are installing the Matlab toolbox, the recommended command is::
|
||||
|
||||
brew install cantera --with-matlab=/Applications/MATLAB_R2014a.app/
|
||||
|
||||
* If something goes wrong with the Homebrew install, re-run the command with
|
||||
the ``-v`` flag to get more verbose output that may help identify the
|
||||
source of the problem::
|
||||
|
||||
brew install -v cantera
|
||||
|
||||
* If Homebrew claims that it can't find a formula named ``cantera``, you may
|
||||
be able to fix it by running the commands::
|
||||
|
||||
brew doctor
|
||||
brew tap --repair
|
||||
|
||||
4. **Test Cantera Installation (Python)**
|
||||
|
||||
* The Python examples will be installed in::
|
||||
|
||||
/usr/local/lib/pythonX.Y/site-packages/cantera/examples/
|
||||
|
||||
where ``X.Y`` is your Python version, e.g. ``2.7``.
|
||||
|
||||
* You may find it convenient to copy the examples to your Desktop::
|
||||
|
||||
cp -r /usr/local/lib/python2.7/site-packages/cantera/examples ~/Desktop/cantera_examples
|
||||
|
||||
* To run an example::
|
||||
|
||||
cd cantera_examples/reactors
|
||||
python reactor1.py
|
||||
|
||||
5. **Test Cantera Installation (Matlab)**
|
||||
|
||||
* The Matlab toolbox, if enabled, will be installed in::
|
||||
|
||||
/usr/local/lib/cantera/matlab
|
||||
|
||||
* To use the Cantera Matlab toolbox, run the following commands in Matlab
|
||||
(each time you start Matlab), or add them to a ``startup.m`` file located
|
||||
in ``/Users/$USER/Documents/MATLAB``, where ``$USER`` is your username::
|
||||
|
||||
addpath(genpath('/usr/local/lib/cantera/matlab'))
|
||||
setenv('PYTHON_CMD', '/usr/local/bin/python')
|
||||
|
||||
* The Matlab examples will be installed in::
|
||||
|
||||
/usr/local/share/cantera/samples/matlab
|
||||
|
||||
* You may find it convenient to copy the examples to your user directory::
|
||||
|
||||
cp -r /usr/local/share/cantera/samples/matlab ~/Documents/MATLAB/cantera_examples
|
||||
|
||||
MacPorts
|
||||
--------
|
||||
|
||||
If you have MacPorts installed (see https://www.macports.org/install.php), you
|
||||
can install Cantera by executing::
|
||||
|
||||
sudo port install cantera
|
||||
|
||||
from the command line. All dependencies will be installed automatically.
|
||||
|
||||
MacPorts installs its own Python interpreter. Be sure to be actually using it by
|
||||
checking::
|
||||
|
||||
sudo port select python python27
|
||||
|
||||
.. _sec-install-ubuntu:
|
||||
|
||||
Ubuntu
|
||||
======
|
||||
|
||||
Ubuntu packages are provided for recent versions of Ubuntu using a Personal
|
||||
Package Archive (PPA). As of Cantera 2.3.0, packages are available for Ubuntu
|
||||
Ubuntu 16.04 (Xenial Xerus) and Ubuntu 16.10 (Yakkety Yak). To see which Ubuntu
|
||||
releases and Cantera versions are currently available, visit
|
||||
https://launchpad.net/~speth/+archive/ubuntu/cantera
|
||||
|
||||
The available packages are:
|
||||
|
||||
- ``cantera-python`` - The Cantera Python module for Python 2.
|
||||
|
||||
- ``cantera-python3`` - The Cantera Python module for Python 3.
|
||||
|
||||
- ``cantera-dev`` - Libraries and header files for compiling your own C++ and
|
||||
Fortran 90 programs that use Cantera.
|
||||
|
||||
To add the Cantera PPA::
|
||||
|
||||
sudo aptitude install python-software-properties
|
||||
sudo apt-add-repository ppa:speth/cantera
|
||||
sudo aptitude update
|
||||
|
||||
To install all of the Cantera packages::
|
||||
|
||||
sudo aptitude install cantera-python cantera-python3 cantera-dev
|
||||
|
||||
or install whichever subset you need by adjusting the above command.
|
||||
|
||||
If you plan on using Cantera from Python, you may also want to install IPython
|
||||
(an advanced interactive Python interpreter) and Matplotlib (a plotting
|
||||
library), which are also available from the above link. Matplotlib is required
|
||||
to run some of the Python examples. For Python 2, these packages can be
|
||||
installed with::
|
||||
|
||||
pip2 install ipython matplotlib
|
||||
|
||||
And for Python 3, these packages can be installed with::
|
||||
|
||||
pip3 install ipython matplotlib
|
||||
|
||||
You may need to install ``pip`` first; instructions can be found on the
|
||||
`pip installation instructions.
|
||||
<https://pip.pypa.io/en/latest/installing.html#install-pip>`_
|
||||
You may need to have superuser access to install packages into the system
|
||||
directories. Alternatively, you can add ``--user`` after ``pip install`` but
|
||||
before the package names to install into your local user directory. An
|
||||
alternative method is to use the Ubuntu repositories, but these tend to
|
||||
be very out of date. For Python 2, the command is::
|
||||
|
||||
sudo aptitude install ipython python-matplotlib
|
||||
|
||||
And for Python 3, these packages can be installed with::
|
||||
|
||||
sudo aptitude install ipython3 python3-matplotlib
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
|
||||
*******************
|
||||
Language Interfaces
|
||||
*******************
|
||||
|
||||
Although most of Cantera is written in C++, interfaces are provided to
|
||||
allow users to work with Cantera from several different languages or
|
||||
environments, including Fortran 90/95, Python, and MATLAB. Which
|
||||
language should you choose? The basic rule of thumb is this: use
|
||||
Python or MATLAB if possible; use C++ or Fortran if necessary.
|
||||
|
||||
Python
|
||||
======
|
||||
|
||||
Python is a free scripting language that is designed to be easy to use. If you
|
||||
are familiar with any other programming language, you can probably learn Python
|
||||
in a couple of hours. It is also an elegant language, and provides a
|
||||
user-friendly introduction to the concepts of object-oriented programming.
|
||||
Python is great for solving problems quickly, and Cantera provides example
|
||||
Python scripts to do calculations ranging from simple evaluation of
|
||||
thermodynamic or transport properties, on up to chemical equilibrium in
|
||||
multiphase mixtures, 1D laminar flames, reactor networks, and more. If your
|
||||
problem can be solved by using Cantera from Python, you'll almost certainly
|
||||
solve it faster with Python than by writing programs in Fortran or C++.
|
||||
|
||||
See http://www.python.org
|
||||
|
||||
Matlab
|
||||
======
|
||||
|
||||
The comments above for Python apply to MATLAB too, except hat Python is free and
|
||||
MATLAB isn't. If you have MATLAB already and are familiar with it, this is a
|
||||
good choice for an environment from which to run Cantera. It is probably the
|
||||
most popular Cantera application environment. http://www.mathworks.com.
|
||||
|
||||
C++
|
||||
===
|
||||
|
||||
If you find that you need full access to the internals of Cantera, or want to
|
||||
extend and customize Cantera, then C++ is the language for you. Most of Cantera
|
||||
is itself written in C++, and so C++ application programs have more direct
|
||||
access to Cantera's core functionality than do programs written in other
|
||||
languages, which access Cantera through a library of C-like functions. From C++,
|
||||
you can implement new equations of state, new models for transport properties,
|
||||
and many other things that simply can't be done through the other language
|
||||
interfaces. If you are doing substantial code development with Cantera, rather
|
||||
than simply using it to solve a few problems, then you will probably want to use
|
||||
it from C++.
|
||||
|
||||
Fortran
|
||||
=======
|
||||
|
||||
Cantera provides an interface to Fortran 90/95, and can even be used from
|
||||
Fortran 77 programs. Use this if you have existing Fortran code you want to port
|
||||
to Cantera.
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
sphinx.ext.mathjax
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allow `MathJax <http://mathjax.org/>`_ to be used to display math
|
||||
in Sphinx's HTML writer - requires the MathJax JavaScript library
|
||||
on your webserver/computer.
|
||||
|
||||
Kevin Dunn, kgdunn@gmail.com, 3-clause BSD license.
|
||||
|
||||
|
||||
For background, installation details and support:
|
||||
|
||||
https://bitbucket.org/kevindunn/sphinx-extension-mathjax
|
||||
|
||||
"""
|
||||
from docutils import nodes
|
||||
from sphinx.application import ExtensionError
|
||||
from sphinx.ext.mathbase import setup_math as mathbase_setup
|
||||
|
||||
def html_visit_math(self, node):
|
||||
self.body.append(self.starttag(node, 'span', '', CLASS='math'))
|
||||
self.body.append(self.builder.config.mathjax_inline[0] + \
|
||||
self.encode(node['latex']) +\
|
||||
self.builder.config.mathjax_inline[1] + '</span>')
|
||||
raise nodes.SkipNode
|
||||
|
||||
def html_visit_displaymath(self, node):
|
||||
self.body.append(self.starttag(node, 'div', CLASS='math'))
|
||||
if node['nowrap']:
|
||||
self.body.append(self.builder.config.mathjax_display[0] + \
|
||||
node['latex'] +\
|
||||
self.builder.config.mathjax_display[1])
|
||||
self.body.append('</div>')
|
||||
raise nodes.SkipNode
|
||||
|
||||
parts = [prt for prt in node['latex'].split('\n\n') if prt.strip() != '']
|
||||
for i, part in enumerate(parts):
|
||||
part = self.encode(part)
|
||||
if i == 0:
|
||||
# necessary to e.g. set the id property correctly
|
||||
if node['number']:
|
||||
self.body.append('<span class="eqno">(%s)</span>' %
|
||||
node['number'])
|
||||
if '&' in part or '\\\\' in part:
|
||||
self.body.append(self.builder.config.mathjax_display[0] + \
|
||||
'\\begin{split}' + part + '\\end{split}' + \
|
||||
self.builder.config.mathjax_display[1])
|
||||
else:
|
||||
self.body.append(self.builder.config.mathjax_display[0] + part + \
|
||||
self.builder.config.mathjax_display[1])
|
||||
self.body.append('</div>\n')
|
||||
raise nodes.SkipNode
|
||||
|
||||
def builder_inited(app):
|
||||
if not app.config.mathjax_path:
|
||||
raise ExtensionError('mathjax_path config value must be set for the '
|
||||
'mathjax extension to work')
|
||||
app.add_javascript(app.config.mathjax_path)
|
||||
|
||||
def setup(app):
|
||||
mathbase_setup(app, (html_visit_math, None), (html_visit_displaymath, None))
|
||||
app.add_config_value('mathjax_path', '', False)
|
||||
app.add_config_value('mathjax_inline', [r'\(', r'\)'], 'html')
|
||||
app.add_config_value('mathjax_display', [r'\[', r'\]'], 'html')
|
||||
app.connect('builder-inited', builder_inited)
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
:orphan:
|
||||
|
||||
.. _matlab-example-@script_name@:
|
||||
|
||||
@script_name@
|
||||
=======================================================================
|
||||
|
||||
.. literalinclude:: @script_path@
|
||||
:language: matlab
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
.. _sec-matlab-examples:
|
||||
|
||||
Index of Examples
|
||||
=================
|
||||
|
||||
This is an index of the examples included with the Cantera Matlab Toolbox.
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
@matlab_tutorials@
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@matlab_examples@
|
||||
|
|
@ -6,14 +6,11 @@ Matlab Interface User's Guide
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
input-tutorial
|
||||
code-docs/importing
|
||||
code-docs/interface
|
||||
code-docs/thermodynamics
|
||||
code-docs/kinetics
|
||||
code-docs/transport
|
||||
code-docs/zero-dim
|
||||
code-docs/one-dim
|
||||
code-docs/data
|
||||
code-docs/utilities
|
||||
examples
|
||||
importing
|
||||
thermodynamics
|
||||
kinetics
|
||||
transport
|
||||
zero-dim
|
||||
one-dim
|
||||
data
|
||||
utilities
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
|
||||
**********************************
|
||||
Tutorial: Working with input files
|
||||
**********************************
|
||||
|
||||
.. highlight:: matlab
|
||||
|
||||
CTI files
|
||||
---------
|
||||
|
||||
This is the typical way to create a Cantera "phase" object in Matlab::
|
||||
|
||||
gas1 = Solution('gri30.cti', 'gri30');
|
||||
|
||||
This statement constructs a ``Solution`` object representing a phase of matter by
|
||||
reading in attributes of the phase from a file, which in this case is
|
||||
``gri30.cti``. This file contains several phase specifications; the one we want
|
||||
here is ``gri30``, which is specified by the second argument. This file contains
|
||||
a complete specification of the GRI-Mech 3.0 reaction mechanism, including
|
||||
element data (name, atomic weight), species data (name, elemental composition,
|
||||
coefficients to compute thermodynamic and transport properties), and reaction
|
||||
data (stoichiometry, rate coefficient parameters). The file is written in a
|
||||
format understood by Cantera, which is described in :ref:`sec-defining-phases`.
|
||||
|
||||
CTI files distributed with Cantera
|
||||
----------------------------------
|
||||
|
||||
Several reaction mechanism files in this format are included in the Cantera
|
||||
distribution, including ones that model high-temperature air, a hydrogen/oxygen
|
||||
reaction mechanism, and a few surface reaction mechanisms. These files are kept
|
||||
in the ``data`` subdirectory within the Cantera installation directory.
|
||||
|
||||
If for some reason Cantera has difficulty finding where these files are on your
|
||||
system, set environment variable ``CANTERA_DATA`` to the directory or
|
||||
directories (separated using ``;`` on Windows or ``:`` on other operating
|
||||
systems) where they are located. Alternatively, you can call function
|
||||
`add_directory` to add a directory to the Cantera search path::
|
||||
|
||||
addDirectory('/usr/local/cantera/my_data_files');
|
||||
|
||||
Cantera input files are plain text files, and can be created with any text
|
||||
editor. See :ref:`sec-defining-phases` for more information.
|
||||
|
||||
Importing multiple phases or interfaces
|
||||
---------------------------------------
|
||||
|
||||
A Cantera input file may contain more than one phase specification, or may
|
||||
contain specifications of interfaces (surfaces). Here we import definitions of
|
||||
two bulk phases and the interface between them from file ``diamond.cti``::
|
||||
|
||||
gas2 = Solution('diamond.cti', 'gas'); % a gas
|
||||
diamond = Solution('diamond.cti', 'diamond'); % bulk diamond
|
||||
diamond_surf = importInterface('diamond.cti', 'diamond_100', ...
|
||||
gas2, diamond);
|
||||
|
||||
Note that the bulk (i.e., 3D) phases that participate in the surface reactions
|
||||
must also be passed as arguments to importInterface.
|
||||
|
||||
Converting CK-format files
|
||||
--------------------------
|
||||
|
||||
See :ref:`sec-ck-format-conversion` in the :ref:`sec-input-files` documentation.
|
||||
|
|
@ -1,625 +0,0 @@
|
|||
.. default-role:: math
|
||||
|
||||
.. py:currentmodule:: cantera
|
||||
|
||||
*****************************
|
||||
Reactors and Reactor Networks
|
||||
*****************************
|
||||
|
||||
A Cantera Reactor represents the simplest form of a chemically reacting system.
|
||||
It corresponds to an extensive thermodynamic control volume `V`, in which all
|
||||
state variables are homogeneously distributed. The system is generally unsteady,
|
||||
i.e. all states are functions of time. In particular, transient state changes
|
||||
due to chemical reactions are possible. However, thermodynamic (but not
|
||||
chemical) equilibrium is assumed to be present throughout the reactor at all
|
||||
instants of time.
|
||||
|
||||
Reactors can interact with the surrounding environment in multiple ways:
|
||||
|
||||
- Expansion/compression work: By moving the walls of the reactor, its volume can
|
||||
be changed and expansion or compression work can be done by or on the system,
|
||||
i.e., the Reactor.
|
||||
- Heat transfer: An arbitrary heat transfer rate can be defined to cross the
|
||||
boundaries of the reactor.
|
||||
- Mass transfer: The reactor can have multiple inlets and outlets. For the
|
||||
inlets, arbitrary states can be defined. Through the outlets, fluid with the
|
||||
current state of the reactor exits the reactor.
|
||||
- Surface interaction: One or multiple walls can influence the chemical
|
||||
reactions in the reactor. This is not just restricted to catalytic reactions,
|
||||
but mass transfer between the surface and the fluid can also be modeled.
|
||||
|
||||
All of these interactions do not have to be constant, but can vary as a function
|
||||
of time or state. For example, heat transfer can be described as a function of
|
||||
the temperature difference between the reactor and the environment, or the wall
|
||||
movement can be modeled depending on the pressure difference. Typically,
|
||||
interactions of the reactor with the environment are defined on one or multiple
|
||||
*walls*, *inlets*, and *outlets*.
|
||||
|
||||
In addition to single reactors, Cantera is also able to interconnect reactors
|
||||
into a *Reactor Network*. Each reactor in a network may be connected so that
|
||||
the contents of one reactor flow into another. Reactors may also be in contact
|
||||
with one another or the environment via walls which move or conduct heat.
|
||||
|
||||
Governing Equations for Single Reactors
|
||||
=======================================
|
||||
|
||||
The state variables for Cantera's general reactor model are
|
||||
|
||||
- `m`, the mass of the reactor's contents (in kg)
|
||||
- `V`, the reactor volume (in m\ :sup:`3`) (not a state variable for
|
||||
*Constant Pressure Reactor* and *Ideal Gas Constant Pressure Reactor*)
|
||||
- A state variable describing the energy of the system, depending on the
|
||||
configuration (see `Energy Conservation`_ for further explanation):
|
||||
|
||||
- General *Reactor*: `U`, the total internal energy of the reactors
|
||||
contents (in J)
|
||||
- *Constant Pressure Reactor*: `H`, the total enthalpy of the reactors
|
||||
contents (in J)
|
||||
- *Ideal Gas Reactor* and *Ideal Gas Constant Pressure Reactor*: `T`, the
|
||||
temperature (in K)
|
||||
|
||||
- `Y_k`, the mass fractions for each species (dimensionless)
|
||||
|
||||
Mass Conservation
|
||||
-----------------
|
||||
|
||||
The total mass of the reactor's contents changes as a result of flow through
|
||||
the reactor's inlets and outlets, and production of homogeneous phase species
|
||||
on the reactor walls:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{dm}{dt} = \sum_{in} \dot{m}_{in} - \sum_{out} \dot{m}_{out} +
|
||||
\dot{m}_{wall}
|
||||
|
||||
Species Conservation
|
||||
--------------------
|
||||
|
||||
The rate at which species `k` is generated through homogeneous phase reactions
|
||||
is `V \dot{\omega}_k W_k`, and the total rate at which species `k` is generated
|
||||
is:
|
||||
|
||||
.. math::
|
||||
|
||||
\dot{m}_{k,gen} = V \dot{\omega}_k W_k + \dot{m}_{k,wall}
|
||||
|
||||
The rate of change in the mass of each species is:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{d(mY_k)}{dt} = \sum_{in} \dot{m}_{in} Y_{k,in} -
|
||||
\sum_{out} \dot{m}_{out} Y_k +
|
||||
\dot{m}_{k,gen}
|
||||
|
||||
Expanding the derivative on the left hand side and substituting the equation
|
||||
for `dm/dt`, the equation for each homogeneous phase species is:
|
||||
|
||||
.. math::
|
||||
|
||||
m \frac{dY_k}{dt} = \sum_{in} \dot{m}_{in} (Y_{k,in} - Y_k)+
|
||||
\dot{m}_{k,gen} - Y_k \dot{m}_{wall}
|
||||
|
||||
|
||||
Reactor Volume
|
||||
--------------
|
||||
|
||||
The reactor volume changes as a function of time due to the motion of one or
|
||||
more walls:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{dV}{dt} = \sum_w f_w A_w v_w(t)
|
||||
|
||||
where `f_w = \pm 1` indicates the facing of the wall, `A_w` is the surface
|
||||
area of the wall, and `v_w(t)` is the velocity of the wall as a function of
|
||||
time.
|
||||
|
||||
For *Constant Pressure Reactor* and *Ideal Gas Constant Pressure Reactor*, the
|
||||
volume is not a state variable, but instead takes on whatever value is
|
||||
consistent with holding the pressure constant.
|
||||
|
||||
Energy Conservation
|
||||
-------------------
|
||||
|
||||
The solution of the energy equation can be enabled or disabled by changing the
|
||||
``energy_enabled`` flag. It is enabled by default.
|
||||
|
||||
The implemented formulation of the energy equation depends on which reactor
|
||||
model is used.
|
||||
|
||||
Standard Reactor
|
||||
****************
|
||||
|
||||
The equation for the total internal energy is found by writing the first law
|
||||
for an open system:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{dU}{dt} = - p \frac{dV}{dt} - \dot{Q} +
|
||||
\sum_{in} \dot{m}_{in} h_{in} - h \sum_{out} \dot{m}_{out}
|
||||
|
||||
|
||||
Constant Pressure Reactor
|
||||
*************************
|
||||
|
||||
For this reactor model, the pressure is held constant. The volume is not a
|
||||
state variable, but instead takes on whatever value is consistent with holding
|
||||
the pressure constant. The total enthalpy replaces the total internal energy
|
||||
as a state variable. Using the definition of the total enthalpy:
|
||||
|
||||
.. math::
|
||||
|
||||
H = U + pV
|
||||
|
||||
\frac{d H}{d t} = \frac{d U}{d t} + p \frac{dV}{dt} + V \frac{dp}{dt}
|
||||
|
||||
Noting that `dp/dt = 0` and substituting into the energy equation yields:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{dH}{dt} = - \dot{Q} + \sum_{in} \dot{m}_{in} h_{in}
|
||||
- h \sum_{out} \dot{m}_{out}
|
||||
|
||||
|
||||
Ideal Gas Reactor
|
||||
*****************
|
||||
|
||||
In case of the Ideal Gas Reactor Model, the reactor temperature `T` is used
|
||||
instead of the total internal energy `U` as a state variable. For an ideal gas,
|
||||
we can rewrite the total internal energy in terms of the mass fractions and
|
||||
temperature:
|
||||
|
||||
.. math::
|
||||
|
||||
U = m \sum_k Y_k u_k(T)
|
||||
|
||||
\frac{dU}{dt} = u \frac{dm}{dt}
|
||||
+ m c_v \frac{dT}{dt}
|
||||
+ m \sum_k u_k \frac{dY_k}{dt}
|
||||
|
||||
Substituting the corresponding derivatives yields an equation for the
|
||||
temperature:
|
||||
|
||||
.. math::
|
||||
|
||||
m c_v \frac{dT}{dt} = - p \frac{dV}{dt} - \dot{Q}
|
||||
+ \sum_{in} \dot{m}_{in} \left( h_{in} - \sum_k u_k Y_{k,in} \right)
|
||||
- \frac{p V}{m} \sum_{out} \dot{m}_{out} - \sum_k \dot{m}_{k,gen} u_k
|
||||
|
||||
While this form of the energy equation is somewhat more complicated, it
|
||||
significantly reduces the cost of evaluating the system Jacobian, since the
|
||||
derivatives of the species equations are taken at constant temperature instead
|
||||
of constant internal energy.
|
||||
|
||||
|
||||
Ideal Gas Constant Pressure Reactor
|
||||
***********************************
|
||||
|
||||
As for the Ideal Gas Reactors, we replace the total enthalpy as a state
|
||||
variable with the temperature by writing the total enthalpy in terms of the
|
||||
mass fractions and temperature:
|
||||
|
||||
.. math::
|
||||
|
||||
H = m \sum_k Y_k h_k(T)
|
||||
|
||||
\frac{dH}{dt} = h \frac{dm}{dt} + m c_p \frac{dT}{dt}
|
||||
+ m \sum_k h_k \frac{dY_k}{dt}
|
||||
|
||||
Substituting the corresponding derivatives yields an equation for the
|
||||
temperature:
|
||||
|
||||
.. math::
|
||||
|
||||
m c_p \frac{dT}{dt} = - \dot{Q} - \sum_k h_k \dot{m}_{k,gen}
|
||||
+ \sum_{in} \dot{m}_{in} \left(h_{in} - \sum_k h_k Y_{k,in} \right)
|
||||
|
||||
|
||||
Wall Interactions
|
||||
-----------------
|
||||
|
||||
The total rate of heat transfer through all walls is:
|
||||
|
||||
.. math::
|
||||
|
||||
\dot{Q} = \sum_w f_w \dot{Q}_w
|
||||
|
||||
where `f_w = \pm 1` indicates the facing of the wall (+1 for the reactor on the
|
||||
left, -1 for the reactor on the right). The heat flux `\dot{Q}_w` through a wall
|
||||
`k` connecting reactors "left" and "right" is computed as:
|
||||
|
||||
.. math::
|
||||
|
||||
\dot{Q}_w = U A (T_{\rm left} - T_{\rm right})
|
||||
+ \epsilon\sigma A (T_{\rm left}^4 - T_{\rm right}^4)
|
||||
+ A q_0(t)
|
||||
|
||||
where `U` is a user-specified heat transfer coefficient (W/m^2-K), `A` is the
|
||||
wall area (m^2), `\epsilon` is the user-specified emissivity, `\sigma` is the
|
||||
Stefan-Boltzmann radiation constant, and `q_0(t)` is a user-specified,
|
||||
time-dependent heat flux (W/m^2). This definition is such that positive `q_0(t)`
|
||||
implies heat transfer from the "left" reactor to the "right" reactor. Each of
|
||||
the user-specified terms defaults to 0.
|
||||
|
||||
In case of surface reactions, there can be a net generation (or destruction) of
|
||||
homogeneous (gas) phase species at the wall. The molar rate of production for
|
||||
each homogeneous phase species `k` on wall `w` is `\dot{s}_{k,w}` (in
|
||||
kmol/s/m^2). The total (mass) production rate for homogeneous phase species `k`
|
||||
on all walls is:
|
||||
|
||||
.. math::
|
||||
|
||||
\dot{m}_{k,wall} = W_k \sum_w A_w \dot{s}_{k,w}
|
||||
|
||||
where `W_k` is the molecular weight of species `k` and `A_w` is the area of
|
||||
each wall. The net mass flux from all walls is then:
|
||||
|
||||
.. math::
|
||||
|
||||
\dot{m}_{wall} = \sum_k \dot{m}_{k,wall}
|
||||
|
||||
|
||||
For each surface species `i`, the rate of change of the site fraction
|
||||
`\theta_{i,w}` on each wall `w` is integrated with time:
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{d\theta_{i,w}}{dt} = \frac{\dot{s}_{i,w} n_i}{\Gamma_w}
|
||||
|
||||
where `\Gamma_w` is the total surface site density on wall `w` and `n_i` is the
|
||||
number of surface sites occupied by a molecule of species `i` (sometimes
|
||||
referred to within Cantera as the molecule's "size").
|
||||
|
||||
Reactor Networks and Devices
|
||||
============================
|
||||
|
||||
While reactors by themselves just define the above governing equations of the
|
||||
reactor, the time integration is performed in reactor networks. A reactor
|
||||
network is therefore necessary even if only a single reactor is considered.
|
||||
|
||||
The advantage of reactor networks obviously is that multiple reactors can be
|
||||
interconnected. Not only mass flow from one reactor into another can be
|
||||
realized, but also heat can be transferred, or the wall between reactors can
|
||||
move. To set up a network, the following components can be defined in addition
|
||||
to the reactors previously mentioned:
|
||||
|
||||
- **Reservoir**: A reservoir can be thought of as an infinitely large volume, in
|
||||
which all states are predefined and never change from their initial values.
|
||||
Typically, it represents a vessel to define temperature and composition of a
|
||||
stream of mass flowing into a reactor, or the ambient fluid surrounding the
|
||||
reactor network. Besides, the fluid flow finally finally exiting a reactor
|
||||
network has to flow into a reservoir. In the latter case, the state of the
|
||||
reservoir (except pressure) is irrelevant.
|
||||
|
||||
- **Wall**: A wall separates two reactors, or a reactor and a reservoir. A wall
|
||||
has a finite area, may conduct or radiate heat between the two reactors on
|
||||
either side, and may move like a piston.
|
||||
|
||||
Walls are stateless objects in Cantera, meaning that no differential equation
|
||||
is integrated to determine any wall property. Since it is the wall (piston)
|
||||
velocity that enters the energy equation, this means that it is the velocity,
|
||||
not the acceleration or displacement, that is specified. The wall velocity is
|
||||
computed from
|
||||
|
||||
.. math:: v = K(P_{\rm left} - P_{\rm right}) + v_0(t),
|
||||
|
||||
where :math:`K` is a non-negative constant, and :math:`v_0(t)` is a specified
|
||||
function of time. The velocity is positive if the wall is moving to the right.
|
||||
|
||||
The heat flux through the wall is computed from
|
||||
|
||||
.. math:: q = U(T_{\rm left} - T_{\rm right}) + \epsilon\sigma (T_{\rm left}^4
|
||||
- T_{\rm right}^4) + q_0(t),
|
||||
|
||||
where :math:`U` is the overall heat transfer coefficient for
|
||||
conduction/convection, and :math:`\epsilon` is the emissivity. The function
|
||||
:math:`q_0(t)` is a specified function of time. The heat flux is positive when
|
||||
heat flows from the reactor on the left to the reactor on the right.
|
||||
|
||||
A heterogeneous reaction mechanism may be specified for one or both of the
|
||||
wall surfaces. The mechanism object (typically an instance of class Interface)
|
||||
must be constructed so that it is properly linked to the object representing
|
||||
the fluid in the reactor the surface in question faces. The surface
|
||||
temperature on each side is taken to be equal to the temperature of the
|
||||
reactor it faces.
|
||||
|
||||
Source: `Python <cython/zerodim.html#wall>`_ | :ct:`C++ <Wall>`
|
||||
|
||||
- **Valve**: A valve is a flow devices with mass flow rate that is a function of
|
||||
the pressure drop across it. The default behavior is linear:
|
||||
|
||||
.. math:: \dot m = K_v (P_1 - P_2)
|
||||
|
||||
if :math:`P_1 > P_2.` Otherwise, :math:`\dot m = 0`. However, an arbitrary
|
||||
function can also be specified, such that
|
||||
|
||||
.. math:: \dot m = F(P_1 - P_2)
|
||||
|
||||
if :math:`P_1 > P_2`, or :math:`\dot m = 0` otherwise. It is never possible
|
||||
for the flow to reverse and go from the downstream to the upstream
|
||||
reactor/reservoir through a line containing a Valve object.
|
||||
|
||||
Valve objects are often used between an upstream reactor and a downstream
|
||||
reactor or reservoir to maintain them both at nearly the same pressure. By
|
||||
setting the constant :math:`K_v` to a sufficiently large value, very small
|
||||
pressure differences will result in flow between the reactors that counteracts
|
||||
the pressure difference.
|
||||
|
||||
- **Mass Flow Controller**: A mass flow controller maintains a specified mass
|
||||
flow rate independent of upstream and downstream conditions. The equation used
|
||||
to compute the mass flow rate is
|
||||
|
||||
.. math:: \dot m = \max(\dot m_0, 0.0)
|
||||
|
||||
where :math:`\dot m_0` is either a constant value or a function of time. Note
|
||||
that if :math:`\dot m_0 < 0`, the mass flow rate will be set to zero, since
|
||||
reversal of the flow direction is not allowed.
|
||||
|
||||
Unlike a real mass flow controller, a MassFlowController object will maintain
|
||||
the flow even if the downstream pressure is greater than the upstream
|
||||
pressure. This allows simple implementation of loops, in which exhaust gas
|
||||
from a reactor is fed back into it through an inlet. But note that this
|
||||
capability should be used with caution, since no account is taken of the work
|
||||
required to do this.
|
||||
|
||||
- **Pressure Controller**: A pressure controller is designed to be used in
|
||||
conjunction with another 'master' flow controller, typically a
|
||||
MassFlowController. The master flow controller is installed on the inlet of
|
||||
the reactor, and the corresponding PressureController is installed on on
|
||||
outlet of the reactor. The PressureController mass flow rate is equal to the
|
||||
master mass flow rate, plus a small correction dependent on the pressure
|
||||
difference:
|
||||
|
||||
.. math:: \dot m = \dot m_{\rm master} + K_v(P_1 - P_2).
|
||||
|
||||
Time Integration
|
||||
----------------
|
||||
|
||||
Cantera provides an ODE solver for solving the stiff equations of reacting
|
||||
systems. If installed in combination with SUNDIALS, their optimized solver is
|
||||
used. Starting off the current state of the system, it can be advanced in time
|
||||
by one of the following methods:
|
||||
|
||||
- ``step()``: The step method computes the state of the system at the a priori
|
||||
unspecified time `t_{\rm new}`. The time `t_{\rm new}` is internally computed
|
||||
so that all states of the system only change within a (specifiable) band of
|
||||
absolute and relative tolerances. Additionally, the time step must not be
|
||||
larger than a predefined maximum time step `\Delta t_{\rm max}`. The new time
|
||||
`t_{\rm new}` is returned by this function.
|
||||
|
||||
- ``advance``\ `(t_{\rm new})`: This method computes the state of the system at
|
||||
time `t_{\rm new}`. `t_{\rm new}` describes the absolute time from the initial
|
||||
time of the system. By calling this method in a for loop for pre-defined
|
||||
times, the state of the system is obtained for exactly the times specified.
|
||||
Internally, several ``step()`` calls are typically performed to reach the
|
||||
accurate state at time `t_{\rm new}`.
|
||||
|
||||
- ``advance_to_steady_state(max_steps, residual_threshold, atol,
|
||||
write_residuals)`` [Python interface only]: If the steady state solution of a
|
||||
reactor network is of interest, this method can be used. Internally, the
|
||||
steady state is approached by time stepping. The network is considered to be
|
||||
at steady state if the feature-scaled residual of the state vector is below a
|
||||
given threshold value (which by default is 10 times the time step rtol).
|
||||
|
||||
The use of the ``advance`` method in a loop has the advantage that it produces
|
||||
results corresponding to a predefined time series. These are associated with a
|
||||
predefined memory consumption and well comparable between simulation runs with
|
||||
different parameters. However, some detail (e.g. a fast ignition process) might
|
||||
not be resolved in the output data due to the typically large time steps.
|
||||
|
||||
The ``step`` method results in much more data points because of the small
|
||||
timesteps needed. Additionally, the absolute time has to be kept tracked of
|
||||
manually.
|
||||
|
||||
Even though Cantera comes pre-defined with typical parameters for tolerances
|
||||
and the maximum internal time step, the solution sometimes diverges. To solve
|
||||
this problem, three parameters can be tuned: The absolute time stepping
|
||||
tolerances, the relative time stepping tolerances, and the maximum time step. A
|
||||
reduction of the latter value is particularly useful when dealing with abrupt
|
||||
changes in the boundary conditions (e.g. opening/closing valves, see also
|
||||
example :ref:`py-example-ic_engine.py`).
|
||||
|
||||
General Usage in Cantera
|
||||
========================
|
||||
|
||||
In Cantera, the following steps are typically necessary to investigate a
|
||||
reactor network:
|
||||
|
||||
1. Define ``Solution`` objects for the fluids to be flowing through your reactor
|
||||
network.
|
||||
|
||||
2. Define the reactor type(s) and reservoir(s) that describe your system. Chose
|
||||
Ideal Gas (Constant Pressure) Reactor(s) if you only consider ideal gas
|
||||
phases.
|
||||
|
||||
3. *Optional:* Set up the boundary conditions and flow devices between reactors
|
||||
or reservoirs.
|
||||
|
||||
4. Define a reactor network which contains all the reactors previously created.
|
||||
|
||||
5. Advance the simulation in time, typically in a for- or while-loop. Note that
|
||||
only the current state is stored in Cantera by default. If you want to
|
||||
observe the transient states, you manually have to keep track of them.
|
||||
|
||||
6. Analyze the data.
|
||||
|
||||
Note that Cantera always solves a transient problem. If you are interested in
|
||||
steady-state conditions, you can run your simulation for a long time until the
|
||||
states are converged (see e.g. example :ref:`py-example-surf_pfr.py`,
|
||||
:ref:`py-example-combustor.py`).
|
||||
|
||||
Cantera comes with a broad variety of well-commented example scrips for reactor
|
||||
networks. Please refer to them for further information (:ref:`Python <sec-cython-examples>`, :ref:`Matlab <sec-matlab-examples>`).
|
||||
|
||||
Common Reactor Types and their Implementation in Cantera
|
||||
========================================================
|
||||
|
||||
Batch Reactor at Constant Volume or at Constant Pressure
|
||||
--------------------------------------------------------
|
||||
|
||||
If you are interested in how a homogeneous chemical composition changes in time
|
||||
when it is left to its own, a simple batch reactor can be used. Two versions
|
||||
are commonly considered: A rigid vessel with fixed volume but variable
|
||||
pressure, or a system idealized at constant pressure but varying volume.
|
||||
|
||||
In Cantera, such a simulation can be performed very easily. The initial state
|
||||
of the solution can be specified by composition and a set of thermodynamic
|
||||
parameters (like temperature and pressure) as a standard Cantera solution
|
||||
object. Upon its base, a general (Ideal Gas) Reactor or an (Ideal Gas) Constant
|
||||
Pressure Reactor can be created, depending on if a constant volume or constant
|
||||
pressure batch reactor should be considered, respectively. The behavior of the
|
||||
solution in time can be simulated as a very simple Reactor Network containing
|
||||
only the formerly created reactor.
|
||||
|
||||
An example for such a Batch Reactor is :ref:`py-example-reactor1.py`.
|
||||
|
||||
Continuously Stirred Tank Reactor
|
||||
---------------------------------
|
||||
|
||||
A Continuously Stirred Tank Reactor (CSTR), also often referred to as
|
||||
Well-Stirred Reactor (WSR), Perfectly Stirred Reactor (PSR), or Longwell
|
||||
Reactor, is essentially a single Cantera reactor with an inlet, an outlet, and
|
||||
constant volume. Therefore, the `Governing Equations for Single Reactors`_
|
||||
defined above apply accordingly.
|
||||
|
||||
Steady state solutions to CSTRs are often of interest. In this case, the mass
|
||||
flow rate `\dot{m}` is constant and equal at inlet and outlet. The mass
|
||||
contained in the confinement `m` divided by `\dot{m}` defines the mean
|
||||
residence time of the fluid in the confinement.
|
||||
|
||||
At steady state, the time derivatives in the governing equations become zero,
|
||||
and the system of ordinary differential equations can be reduced to a set of
|
||||
coupled nonlinear algebraic equations. A Newton solver could be used to solve
|
||||
this system of equations. However, a sophisticated implementation might be
|
||||
required to account for the strong nonlinearities and the presence of multiple
|
||||
solutions.
|
||||
|
||||
Cantera does not have such a Newton solver implemented. Instead, steady CSTRs
|
||||
are simulated by considering a time-dependent constant volume reactor with
|
||||
specified in- and outflow conditions. Starting off at an initial solution, the
|
||||
reactor network containing this reactor is advanced in time until the state of
|
||||
the solution is converged. An example for this procedure is
|
||||
:ref:`py-example-combustor.py`.
|
||||
|
||||
A problem can be the ignition of a CSTR: If the reactants are not reactive
|
||||
enough, the simulation can result in the trivial solution that inflow and
|
||||
outflow states are identical. To solve this problem, the reactor can be
|
||||
initialized with a high temperature and/or radical concentration. A good
|
||||
approach is to use the equilibrium composition of the reactants (which can be
|
||||
computed using Cantera's ``equilibrate`` function) as an initial guess.
|
||||
|
||||
|
||||
Plug-Flow Reactor
|
||||
-----------------
|
||||
|
||||
A Plug-Flow Reactor (PFR) represents a steady-state channel with a
|
||||
cross-sectional area `A`. Typically an ideal gas flows through it at a constant
|
||||
mass flow rate `\dot{m}`. Perpendicular to the flow direction, the gas is
|
||||
considered to be completely homogeneous. In the axial direction `z`, the states
|
||||
of the gas is allowed to change. However, all diffusion processes are neglected.
|
||||
|
||||
Plug-Flow Reactors are often used to simulate ignition delay times, emission
|
||||
formation, and catalytic processes.
|
||||
|
||||
The governing equations of Plug-Flow Reactors are [KCG2003]_:
|
||||
|
||||
- Mass conservation:
|
||||
|
||||
.. math:: \frac{d(\rho u A)}{dz} = P' \sum_k \dot{s}_k W_k
|
||||
|
||||
where `u` is the axial velocity in (m/s) and `P'` is the chemically active
|
||||
channel perimeter in (m) (chemically active perimeter per unit length).
|
||||
|
||||
- Continuity equation of species `k`:
|
||||
|
||||
.. math:: \rho u \frac{d Y_k}{dz} + Y_k P' \sum_k \dot{s}_k W_k =
|
||||
\dot{\omega}_k W_k + P' \dot{s}_k W_k
|
||||
|
||||
- Energy conservation:
|
||||
|
||||
.. math:: \rho u A c_p \frac{d T}{d z} =
|
||||
- A \sum_k h_k \dot{\omega}_k W_k
|
||||
- P' \sum_k h_k \dot{s}_k W_k
|
||||
+ U P (T_w - T)
|
||||
|
||||
where `U` is the heat transfer coefficient in (W/m/K), `P` is the perimeter of
|
||||
the duct in (m), and `T_w` is the wall temperature in (K). Kinetic and
|
||||
potential energies are neglected.
|
||||
|
||||
- Momentum conservation in the axial direction:
|
||||
|
||||
.. math:: \rho u A \frac{d u}{d z} + u P' \sum_k \dot{s}_k W_k =
|
||||
- \frac{d (p A)}{dz} - \tau_w P
|
||||
|
||||
where `\tau_w` is the wall friction coefficient (which might be computed from
|
||||
Reynolds number based correlations).
|
||||
|
||||
Even though this problem extends geometrically in one direction, it can be
|
||||
modeled via zero-dimensional reactors: Due to the neglecting of diffusion,
|
||||
downstream parts of the reactor have no influence on upstream parts. Therefore,
|
||||
PFRs can be modeled by marching from the beginning to the end of the reactor.
|
||||
|
||||
Cantera does not (yet) provide dedicated class to solve the PFR equations (The
|
||||
``FlowReactor`` class is currently under development). However, there are two
|
||||
ways to simulate a PFR with the reactor elements previously presented. Both
|
||||
rely on the assumption that pressure is approximately constant throughout the
|
||||
Plug-Flow Reactor and that there is no friction. The momentum conservation
|
||||
equation is thus neglected.
|
||||
|
||||
|
||||
PFR Modeling by Considering a Lagrangian Reactor
|
||||
************************************************
|
||||
|
||||
A Plug-Flow Reactor can also be described from a Lagrangian point of view: An
|
||||
unsteady fluid particle is considered which travels along the axial streamline
|
||||
through the PFR. Since there is no information traveling upstream, the state
|
||||
change of the fluid particle can be computed by a forward (upwind) integration
|
||||
in time. Using the continuity equation, the speed of the particle can be
|
||||
derived. By integrating the velocity in time, the temporal information can be
|
||||
translated into the spatial resolution of the PFR.
|
||||
|
||||
An example for this procedure can be found in :ref:`py-example-pfr.py`.
|
||||
|
||||
|
||||
PFR Modeling as a Series of CSTRs
|
||||
*********************************
|
||||
|
||||
The Plug-Flow Reactor is spatially discretized into a large number of axially
|
||||
distributed volumes. These volumes are modeled to be steady-state CSTRs.
|
||||
|
||||
The only reason to use this approach as opposed to the Lagrangian one is if you
|
||||
need to include surface reactions, because the system of equations ends up
|
||||
being a DAE system instead of an ODE system.
|
||||
|
||||
In Cantera, it is sufficient to consider a single reactor and march it forward
|
||||
in time, because there is no information traveling upstream. The mass flow rate
|
||||
`\dot{m}` through the PFR enters the reactor from an upstream reservoir. For
|
||||
the first reactor, the reservoir conditions are the inflow boundary conditions
|
||||
of the PFR. By performing a time integration as described in `Continuously
|
||||
Stirred Tank Reactor`_ until the state of the reactor is converged, the
|
||||
steady-state CSTR solution is computed. The state of the CSTR is the inlet
|
||||
boundary condition for the next CSTR downstream.
|
||||
|
||||
An example for this procedure can be found in :ref:`py-example-pfr.py` and
|
||||
:ref:`py-example-surf_pfr.py`.
|
||||
|
||||
|
||||
Advanced Concepts
|
||||
=================
|
||||
|
||||
In some cases, Cantera's solver is insufficient to describe a certain
|
||||
configuration. In this situation, Cantera can still be used to provide chemical
|
||||
and thermodynamic computations, but external ODE solvers can be applied. See
|
||||
example :ref:`py-example-custom.py`.
|
||||
|
||||
|
||||
Literature
|
||||
==========
|
||||
|
||||
For further reading, the following books are recommended:
|
||||
|
||||
.. [KCG2003] Kee, Coltrin, Glarborg: *Chemically Reacting Flow*.
|
||||
Wiley-Interscience, 2003
|
||||
|
||||
.. [Tur2000] Turns: *An Introduction to Combustion: Concepts and Applications*,
|
||||
McGraw Hill, 2000
|
||||
25
doc/sphinx/yaml/elements.rst
Normal file
25
doc/sphinx/yaml/elements.rst
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
.. highlight:: yaml
|
||||
|
||||
.. _sec-yaml-elements:
|
||||
|
||||
********
|
||||
Elements
|
||||
********
|
||||
|
||||
``element`` entries are needed only when defining custom elements that are not
|
||||
standard chemical elements, or defining specific isotopes.
|
||||
|
||||
The fields of an ``element`` entry are:
|
||||
|
||||
``symbol``
|
||||
The symbol used for the element, as used when specifying the composition of
|
||||
species.
|
||||
|
||||
``atomic-weight``
|
||||
The atomic weight of the element, in unified atomic mass units (dalton).
|
||||
|
||||
``atomic-number``
|
||||
The atomic number of the element. Optional.
|
||||
|
||||
``entropy298``
|
||||
The standard molar entropy of the element at 298.15 K. Optional.
|
||||
97
doc/sphinx/yaml/general.rst
Normal file
97
doc/sphinx/yaml/general.rst
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
.. highlight:: yaml
|
||||
|
||||
*****************
|
||||
General Structure
|
||||
*****************
|
||||
|
||||
Sections
|
||||
--------
|
||||
|
||||
The top level of a Cantera `YAML <https://yaml.org/spec/1.2/spec.html#Introduction>`__
|
||||
input file is a mapping that defines different input file sections. Each
|
||||
section consists of a list of mappings that define objects of the same type,
|
||||
e.g., reactions, species, phases, or elements. The ``phases`` section of an input
|
||||
file contains all of the phase definitions. Multiple sections containing
|
||||
reaction, species, or element definitions can be used. The specific names
|
||||
``reactions``, ``species``, and ``elements`` are used as defaults when looking
|
||||
for :ref:`sec-yaml-reactions`, :ref:`sec-yaml-species`, and
|
||||
:ref:`sec-yaml-elements` to add to a phase. A simple input file has the
|
||||
following structure::
|
||||
|
||||
phases:
|
||||
- name: spam
|
||||
thermo: ideal-gas
|
||||
# Additional fields come after this
|
||||
- name: green-eggs
|
||||
thermo: model-name
|
||||
# Additional fields come after this
|
||||
|
||||
species:
|
||||
- name: A
|
||||
# Additional fields come after this
|
||||
- name: B
|
||||
# Additional fields come after this
|
||||
- name: C
|
||||
# Additional fields come after this
|
||||
|
||||
reactions:
|
||||
- equation: A + B <=> C + D
|
||||
# Additional fields come after this
|
||||
- equation: A + C <=> 2 D
|
||||
# Additional fields come after this
|
||||
|
||||
Units
|
||||
-----
|
||||
|
||||
While Cantera generally works internally in SI units, input values can be
|
||||
provided using a number of different units.
|
||||
|
||||
Compound units are written using the asterisk (``*``) to indicate
|
||||
multiplication, the forward slash (``/``) to indicate division, and the caret
|
||||
(``^``) to indicate exponentiation. Exponents can include negative and decimal
|
||||
values. Standard one-letter metric prefixes can be applied to any unit.
|
||||
Supported base units are:
|
||||
|
||||
- Mass: ``g``
|
||||
- Length: ``m``, ``micron``, ``angstrom``, ``Å``
|
||||
- Time: ``s``, ``min``, ``hr``
|
||||
- Temperature: ``K``, ``C``
|
||||
- Current: ``A``
|
||||
- Quantity: ``mol`` (gram mole), ``gmol``, ``mole``, ``kmol``, ``kgmol``, ``molec``
|
||||
|
||||
Supported compound units are:
|
||||
|
||||
- Energy: ``J``, ``cal``, ``erg``, ``eV``
|
||||
- Activation Energy: ``K``, or any unit of energy per quantity (``J/kmol``,
|
||||
``cal/mol``, etc.)
|
||||
- Force: ``N``, ``dyn``
|
||||
- Pressure: ``Pa``, ``atm``, ``bar``, ``dyn/cm^2``
|
||||
- Volume: ``m^3``, ``liter``, ``L``, ``l``, ``cc``
|
||||
- Other electrical units: ``ohm``, ``V``, ``coulomb``
|
||||
|
||||
Units can be specified on individual input values by placing them after the
|
||||
value, separated by a space::
|
||||
|
||||
{A: 1.45e9 cm^3/kmol, b: 0.4, Ea: 21033 kJ/kmol}
|
||||
|
||||
or by using a ``units`` mapping::
|
||||
|
||||
units: {mass: g, quantity: mol, pressure: atm, activation-energy: cal/mol}
|
||||
|
||||
A ``units`` mapping will set the default units for all values within the same
|
||||
YAML list or mapping, including any nested lists and mappings. Units not
|
||||
specified by a mapping use the values from higher level mappings, or the Cantera
|
||||
defaults if no ``units`` mapping specifies applicable units. If a ``units``
|
||||
mapping appears in a list, it must be the first item in that list.
|
||||
|
||||
Default units may be set for ``mass``, ``length``, ``time``, ``temperature``,
|
||||
``current``, ``quantity``, ``pressure``, ``energy``, and ``activation-energy``.
|
||||
The units ``pressure`` and ``energy`` are used when these units appear
|
||||
explicitly in the units that a value is being converted to within Cantera. For
|
||||
example, a conversion to ``N/m^2`` will use the default units for mass, length,
|
||||
and time, while a conversion to ``Pa`` will use the default units for pressure.
|
||||
|
||||
Conversions of activation energies implicitly include scaling by the gas
|
||||
constant where necessary. Setting default units for ``energy`` and ``quantity``
|
||||
will determine the default units of ``activation-energy``, which can be
|
||||
overridden by explicitly giving the desired units of ``activation-energy``.
|
||||
13
doc/sphinx/yaml/index.rst
Normal file
13
doc/sphinx/yaml/index.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
*************************
|
||||
YAML Input File Reference
|
||||
*************************
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
general
|
||||
phases
|
||||
elements
|
||||
species
|
||||
reactions
|
||||
808
doc/sphinx/yaml/phases.rst
Normal file
808
doc/sphinx/yaml/phases.rst
Normal file
|
|
@ -0,0 +1,808 @@
|
|||
.. highlight:: yaml
|
||||
|
||||
*****************
|
||||
Phase Definitions
|
||||
*****************
|
||||
|
||||
A ``phase`` is a mapping that contains definitions for the elements, species,
|
||||
and optionally reactions that can take place in that phase. The fields of a
|
||||
``phase`` entry are:
|
||||
|
||||
``name``
|
||||
String identifier used for the phase. Required.
|
||||
|
||||
``elements``
|
||||
Specification for the elements present in the phase. This can be:
|
||||
|
||||
- Omitted, in which case the standard elements will be added as needed by
|
||||
the species included in the phase.
|
||||
- A list of element symbols, which can be either defined in the ``elements``
|
||||
section of the file or taken from the standard elements.
|
||||
- A list of single-key mappings of section names to lists of element
|
||||
symbols. These sections can be in the same file as the phase definition,
|
||||
or from another file if written as ``file-path/sectionname``. If a
|
||||
relative path is specified, the directory containing the current file is
|
||||
searched first, followed by the Cantera data path. Standard elements can
|
||||
be included by referencing the fictitious section ``default``.
|
||||
|
||||
``species``
|
||||
Specification for the species present in the phase. This can be:
|
||||
|
||||
- a list of species that appear in the ``species`` section of the file.
|
||||
- The string ``all``, to indicate that all species in the ``species``
|
||||
section should be included. This is the default if no ``species`` entry
|
||||
is present.
|
||||
- A list of single-key mappings of section names to either the string
|
||||
``all`` or a list of species names. These sections can be in the same
|
||||
file as the phase definition, or from another file if written as
|
||||
``file-path/sectionname``. If a relative path is specified, the directory
|
||||
containing the current file is searched first, followed by the Cantera
|
||||
data path.
|
||||
|
||||
Species may be skipped depending on the setting of the
|
||||
``skip-undeclared-elements`` option.
|
||||
|
||||
``skip-undeclared-elements``
|
||||
If set to ``true``, do not add species that contain elements that are not
|
||||
explicitly included in the phase. The default is ``false``, where the
|
||||
presence of such species is considered an error.
|
||||
|
||||
``skip-undeclared-third-bodies``
|
||||
If set to ``true``, ignore third body efficiencies for species that are not
|
||||
defined in the phase. The default is ``false``, where the presence of
|
||||
such third body specifications is considered an error.
|
||||
|
||||
``state``
|
||||
A mapping specifying the thermodynamic state. See
|
||||
:ref:`sec-yaml-setting-state`.
|
||||
|
||||
``thermo``
|
||||
String specifying the phase thermodynamic model to be used. Supported model
|
||||
strings are:
|
||||
|
||||
- :ref:`binary-solution-tabulated <sec-yaml-binary-solution-tabulated>`
|
||||
- :ref:`compound-lattice <sec-yaml-compound-lattice>`
|
||||
- :ref:`constant-density <sec-yaml-constant-density>`
|
||||
- :ref:`Debye-Huckel <sec-yaml-Debye-Huckel>`
|
||||
- :ref:`edge <sec-yaml-edge>`
|
||||
- :ref:`fixed-chemical-potential <sec-yaml-fixed-chemical-potential>`
|
||||
- :ref:`fixed-stoichiometry <sec-yaml-fixed-stoichiometry>`
|
||||
- :ref:`HMW-electrolyte <sec-yaml-HMW-electrolyte>`
|
||||
- :ref:`ideal-gas <sec-yaml-ideal-gas>`
|
||||
- :ref:`ideal-gas-VPSS <sec-yaml-ideal-gas-VPSS>`
|
||||
- :ref:`ideal-molal-solution <sec-yaml-ideal-molal-solution>`
|
||||
- :ref:`ideal-condensed <sec-yaml-ideal-condensed>`
|
||||
- :ref:`ideal-solution-VPSS <sec-yaml-ideal-solution-VPSS>`
|
||||
- :ref:`ideal-surface <sec-yaml-ideal-surface>`
|
||||
- :ref:`ions-from-neutral-molecule <sec-yaml-ions-from-neutral-molecule>`
|
||||
- :ref:`lattice <sec-yaml-lattice>`
|
||||
- :ref:`liquid-water-IAPWS95 <sec-yaml-liquid-water-IAPWS95>`
|
||||
- :ref:`Margules <sec-yaml-Margules>`
|
||||
- :ref:`Maskell-solid-solution <sec-yaml-Maskell-solid-solution>`
|
||||
- :ref:`electron-cloud <sec-yaml-electron-cloud>`
|
||||
- :ref:`pure-fluid <sec-yaml-pure-fluid>`
|
||||
- :ref:`Redlich-Kister <sec-yaml-Redlich-Kister>`
|
||||
- :ref:`Redlich-Kwong <sec-yaml-Redlich-Kwong>`
|
||||
|
||||
``kinetics``
|
||||
String specifying the kinetics model to be used. Supported model strings
|
||||
are:
|
||||
|
||||
- none
|
||||
- `gas <https://cantera.org/documentation/dev/doxygen/html/de/dae/classCantera_1_1GasKinetics.html#details>`__
|
||||
- `surface <https://cantera.org/documentation/dev/doxygen/html/d1/d72/classCantera_1_1InterfaceKinetics.html#details>`__
|
||||
- `edge <https://cantera.org/documentation/dev/doxygen/html/d0/df0/classCantera_1_1EdgeKinetics.html#details>`__
|
||||
|
||||
``reactions``
|
||||
Source of reactions to include in the phase, if a kinetics model has been
|
||||
specified. This can be:
|
||||
|
||||
- The string ``all``, which indicates that all reactions from the
|
||||
``reactions`` section of the file should be included. This is the default
|
||||
if no ``reactions`` entry is present.
|
||||
- The string ``declared-species``, which indicates that all reactions from
|
||||
the ``reactions`` section involving only species present in the phase
|
||||
should be included.
|
||||
- The string ``none``, which indicates that no reactions should be added.
|
||||
This can be used if reactions will be added programmatically after
|
||||
the phase is constructed.
|
||||
- A list of sections from which to include reactions. These sections can be
|
||||
in the same file as the phase definition, or from another file if written
|
||||
as ``file-path/sectionname``. If a relative path is specified, the
|
||||
directory containing the current file is searched first, followed by the
|
||||
Cantera data path.
|
||||
- A list of single-key mappings of section names to rules for adding
|
||||
reactions, where for each section name, that rule is either ``all`` or
|
||||
``declared-species`` and is applied as described above.
|
||||
|
||||
``Motz-Wise``
|
||||
Boolean indicating whether the Motz-Wise correction should be applied to
|
||||
sticking reactions. Applicable only to interface phases. The default is
|
||||
``false``. The value set at the phase level may be overridden on individual
|
||||
reactions.
|
||||
|
||||
``transport``
|
||||
String specifying the transport model to be used. Supported model strings
|
||||
are:
|
||||
|
||||
- none
|
||||
- `high-pressure <https://cantera.org/documentation/dev/doxygen/html/d9/d63/classCantera_1_1HighPressureGasTransport.html#details>`__
|
||||
- `ionized-gas <https://cantera.org/documentation/dev/doxygen/html/d4/d65/classCantera_1_1IonGasTransport.html#details>`__
|
||||
- `mixture-averaged <https://cantera.org/documentation/dev/doxygen/html/d9/d17/classCantera_1_1MixTransport.html#details>`__
|
||||
- `mixture-averaged-CK <https://cantera.org/documentation/dev/doxygen/html/d9/d17/classCantera_1_1MixTransport.html#details>`__
|
||||
- `multicomponent <https://cantera.org/documentation/dev/doxygen/html/df/d7c/classCantera_1_1MultiTransport.html#details>`__
|
||||
- `multicomponent-CK <https://cantera.org/documentation/dev/doxygen/html/df/d7c/classCantera_1_1MultiTransport.html#details>`__
|
||||
- `unity-Lewis-number <https://cantera.org/documentation/dev/doxygen/html/d3/dd6/classCantera_1_1UnityLewisTransport.html#details>`__
|
||||
- `water <https://cantera.org/documentation/dev/doxygen/html/df/d1f/classCantera_1_1WaterTransport.html#details>`__
|
||||
|
||||
|
||||
|
||||
.. _sec-yaml-setting-state:
|
||||
|
||||
Setting the state
|
||||
=================
|
||||
|
||||
The state of a ``phase`` can be set using two properties to set the
|
||||
thermodynamic state, plus the composition.
|
||||
|
||||
The composition can be set using one of the following fields, depending on the
|
||||
phase type. The composition is specified as a mapping of species names to
|
||||
values. Where necessary, the values will be automatically normalized.
|
||||
|
||||
- ``mass-fractions`` or ``Y``
|
||||
- ``mole-fractions`` or ``X``
|
||||
- ``coverages``
|
||||
- ``molalities`` or ``M``
|
||||
|
||||
The thermodynamic state can be set using the following property pairs, with some
|
||||
exceptions for phases where setting that property pair is not implemented. All
|
||||
properties are on a per unit mass basis where relevant:
|
||||
|
||||
- ``T`` and ``P``
|
||||
- ``T`` and ``D``
|
||||
- ``T`` and ``V``
|
||||
- ``H`` and ``P``
|
||||
- ``U`` and ``V``
|
||||
- ``S`` and ``V``
|
||||
- ``S`` and ``P``
|
||||
- ``S`` and ``T``
|
||||
- ``P`` and ``V``
|
||||
- ``U`` and ``P``
|
||||
- ``V`` and ``H``
|
||||
- ``T`` and ``H``
|
||||
- ``S`` and ``H``
|
||||
- ``D`` and ``P``
|
||||
|
||||
The following synonyms are also implemented for use in any of the pairs:
|
||||
|
||||
- ``temperature``, ``T``
|
||||
- ``pressure``, ``P``
|
||||
- ``enthalpy``, ``H``
|
||||
- ``entropy``, ``S``
|
||||
- ``int-energy``, ``internal-energy``, ``U``
|
||||
- ``specific-volume``, ``V``
|
||||
- ``density``, ``D``
|
||||
|
||||
|
||||
.. _sec-phase-thermo-models:
|
||||
|
||||
Phase thermodynamic models
|
||||
==========================
|
||||
|
||||
.. _sec-yaml-binary-solution-tabulated:
|
||||
|
||||
``binary-solution-tabulated``
|
||||
-----------------------------
|
||||
|
||||
A phase implementing tabulated standard state thermodynamics for one species in
|
||||
a binary solution, as `described here <https://cantera.org/documentation/dev/doxygen/html/de/ddf/classCantera_1_1BinarySolutionTabulatedThermo.html#details>`__.
|
||||
|
||||
Includes the fields of :ref:`sec-yaml-ideal-molal-solution`, plus:
|
||||
|
||||
``tabulated-species``
|
||||
The name of the species to which the tabulated enthalpy and entropy is
|
||||
added.
|
||||
|
||||
``tabulated-thermo``
|
||||
A mapping containing three lists of equal lengths:
|
||||
|
||||
``mole-fractions``
|
||||
A list of mole fraction values for the tabulated species.
|
||||
|
||||
``enthalpy``
|
||||
The extra molar enthalpy to be added to the tabulated species at these
|
||||
mole fractions.
|
||||
|
||||
``entropy``
|
||||
The extra molar entropy to be added to the tabulated species at these
|
||||
mole fractions.
|
||||
|
||||
|
||||
.. _sec-yaml-compound-lattice:
|
||||
|
||||
``compound-lattice``
|
||||
--------------------
|
||||
|
||||
A phase that is comprised of a fixed additive combination of other lattice
|
||||
phases, as `described here <https://cantera.org/documentation/dev/doxygen/html/de/de1/classCantera_1_1LatticeSolidPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``composition``
|
||||
A mapping of component phase names to their relative stoichiometries.
|
||||
|
||||
Example::
|
||||
|
||||
thermo: compound-lattice
|
||||
composition: {Li7Si3(s): 1.0, Li7Si3-interstitial: 1.0}
|
||||
|
||||
|
||||
.. _sec-yaml-constant-density:
|
||||
|
||||
``constant-density``
|
||||
--------------------
|
||||
|
||||
An incompressible phase with constant density, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d9/de4/classCantera_1_1ConstDensityThermo.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``density``
|
||||
The density of the phase
|
||||
|
||||
Example::
|
||||
|
||||
thermo: constant-density
|
||||
density: 0.7 g/cm^3
|
||||
|
||||
|
||||
.. _sec-yaml-Debye-Huckel:
|
||||
|
||||
``Debye-Huckel``
|
||||
----------------
|
||||
|
||||
The Debye-Hückel model as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d8/d9a/classCantera_1_1DebyeHuckel.html#details>`__.
|
||||
|
||||
Additional parameters for this model are contained in the ``activity-data``
|
||||
field:
|
||||
|
||||
``activity-data``
|
||||
The activity data field contains the following fields:
|
||||
|
||||
``model``
|
||||
One of ``dilute-limit``, ``B-dot-with-variable-a``,
|
||||
``B-dot-with-common-a``, ``beta_ij``, or ``Pitzer-with-beta_ij``
|
||||
|
||||
``A_Debye``
|
||||
The value of the Debye "A" parameter, or the string ``variable`` to use
|
||||
a calculation based on the water equation of state.
|
||||
|
||||
``B_Debye``
|
||||
The Debye "B" parameter
|
||||
|
||||
``max-ionic-strength``
|
||||
The maximum ionic strength
|
||||
|
||||
``use-Helgeson-fixed-form``
|
||||
Boolean, ``true`` or ``false``
|
||||
|
||||
``default-ionic-radius``
|
||||
Ionic radius to use for species where the ionic radius has not been
|
||||
specified.
|
||||
|
||||
``B-dot``
|
||||
The value of B-dot.
|
||||
|
||||
``beta``
|
||||
List of mappings providing values of :math:`\beta_{ij}` for different
|
||||
species pairs. Each mapping contains a ``species`` key that contains a
|
||||
list of two species names, and a ``beta`` key that contains the
|
||||
corresponding value of :math:`\beta_{ij}`.
|
||||
|
||||
Example::
|
||||
|
||||
thermo: Debye-Huckel
|
||||
activity-data:
|
||||
model: beta_ij
|
||||
max-ionic-strength: 3.0
|
||||
use-Helgeson-fixed-form: true
|
||||
default-ionic-radius: 3.042843 angstrom
|
||||
beta:
|
||||
- species: [H+, Cl-]
|
||||
beta: 0.27
|
||||
- species: [Na+, Cl-]
|
||||
beta: 0.15
|
||||
- species: [Na+, OH-]
|
||||
beta: 0.06
|
||||
|
||||
|
||||
.. _sec-yaml-edge:
|
||||
|
||||
``edge``
|
||||
--------
|
||||
|
||||
A one-dimensional edge between two surfaces, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d9/d17/classCantera_1_1EdgePhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``site-density``
|
||||
The molar density of sites per unit length along the edge
|
||||
|
||||
Example::
|
||||
|
||||
thermo: edge
|
||||
site-density: 5.0e-17 mol/cm
|
||||
|
||||
|
||||
.. _sec-yaml-fixed-chemical-potential:
|
||||
|
||||
``fixed-chemical-potential``
|
||||
----------------------------
|
||||
|
||||
A phase defined by a fixed value of the chemical potential, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d6/db0/classCantera_1_1FixedChemPotSSTP.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``chemical-potential``
|
||||
The molar chemical potential of the phase
|
||||
|
||||
Example::
|
||||
|
||||
thermo: fixed-chemical-potential
|
||||
chemical-potential: -2.3e7 J/kmol
|
||||
|
||||
|
||||
.. _sec-yaml-fixed-stoichiometry:
|
||||
|
||||
``fixed-stoichiometry``
|
||||
-----------------------
|
||||
|
||||
A phase with fixed composition, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d3/d50/classCantera_1_1StoichSubstance.html#details>`__.
|
||||
|
||||
|
||||
.. _sec-yaml-HMW-electrolyte:
|
||||
|
||||
``HMW-electrolyte``
|
||||
-------------------
|
||||
|
||||
A dilute or concentrated liquid electrolyte phase that obeys the Pitzer
|
||||
formulation for nonideality, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/de/d1d/classCantera_1_1HMWSoln.html#details>`__.
|
||||
|
||||
Additional parameters for this model are contained in the ``activity-data``
|
||||
field:
|
||||
|
||||
``activity-data``
|
||||
The activity data field contains the following fields:
|
||||
|
||||
``temperature-model``
|
||||
The form of the Pitzer temperature model. One of ``constant``,
|
||||
``linear`` or ``complex``.
|
||||
|
||||
``A_Debye``
|
||||
The value of the Debye "A" parameter, or the string ``variable`` to use
|
||||
a calculation based on the water equation of state.
|
||||
|
||||
``max-ionic-strength``
|
||||
The maximum ionic strength
|
||||
|
||||
``interactions``
|
||||
A list of mappings, where each mapping describes a binary or ternary
|
||||
interaction among species. Fields of this mapping include:
|
||||
|
||||
``species``
|
||||
A list of one to three species names
|
||||
|
||||
``beta0``
|
||||
The :math:`\beta^{(0)}` parameters for an cation/anion interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``beta1``
|
||||
The :math:`\beta^{(1)}` parameters for an cation/anion interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``beta2``
|
||||
The :math:`\beta^{(2)}` parameters for an cation/anion interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``Cphi``
|
||||
The :math:`C^\phi` parameters for an cation/anion interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``alpha1``
|
||||
The :math:`\alpha^{(1)}` parameter for an cation/anion interaction.
|
||||
|
||||
``alpha2``
|
||||
The :math:`\alpha^{(2)}` parameter for an cation/anion interaction.
|
||||
|
||||
``theta``
|
||||
The :math:`\theta` parameters for a like-charged binary interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``lambda``
|
||||
The :math:`\lambda` parameters for binary interactions involving at
|
||||
least one neutral species. 1, 2, or 5 values depending on the value
|
||||
of ``temperature-model``.
|
||||
|
||||
``psi``
|
||||
The :math:`\Psi` parameters for ternary interactions involving three
|
||||
charged species. 1, 2, or 5 values depending on the value of
|
||||
``temperature-model``.
|
||||
|
||||
``zeta``
|
||||
The :math:`\zeta` parameters for ternary interactions involving one
|
||||
neutral species. 1, 2, or 5 values depending on the value of
|
||||
``temperature-model``.
|
||||
|
||||
``mu``
|
||||
The :math:`\mu` parameters for a neutral species self-interaction.
|
||||
1, 2, or 5 values depending on the value of ``temperature-model``.
|
||||
|
||||
``cropping-coefficients``
|
||||
|
||||
``ln_gamma_k_min``
|
||||
Default -5.0.
|
||||
|
||||
``ln_gamma_k_max``
|
||||
Default 15.0.
|
||||
|
||||
``ln_gamma_o_min``
|
||||
Default -6.0.
|
||||
|
||||
``ln_gamma_o_max``
|
||||
Default 3.0.
|
||||
|
||||
Example::
|
||||
|
||||
thermo: HMW-electrolyte
|
||||
activity-data:
|
||||
temperature-model: complex
|
||||
A_Debye: 1.175930 kg^0.5/gmol^0.5
|
||||
interactions:
|
||||
- species: [Na+, Cl-]
|
||||
beta0: [0.0765, 0.008946, -3.3158E-6, -777.03, -4.4706]
|
||||
beta1: [0.2664, 6.1608E-5, 1.0715E-6, 0.0, 0.0]
|
||||
beta2: [0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
Cphi: [0.00127, -4.655E-5, 0.0, 33.317, 0.09421]
|
||||
alpha1: 2.0
|
||||
- species: [H+, Cl-]
|
||||
beta0: [0.1775]
|
||||
beta1: [0.2945]
|
||||
beta2: [0.0]
|
||||
Cphi: [0.0008]
|
||||
alpha1: 2.0
|
||||
- species: [Na+, OH-]
|
||||
beta0: 0.0864
|
||||
beta1: 0.253
|
||||
beta2: 0.0
|
||||
Cphi: 0.0044
|
||||
alpha1: 2.0
|
||||
alpha2: 0.0
|
||||
- {species: [Cl-, OH-], theta: -0.05}
|
||||
- {species: [Na+, Cl-, OH-], psi: -0.006}
|
||||
- {species: [Na+, H+], theta: 0.036}
|
||||
- {species: [Cl-, Na+, H+], psi: [-0.004]}
|
||||
|
||||
|
||||
.. _sec-yaml-ideal-gas:
|
||||
|
||||
``ideal-gas``
|
||||
-------------
|
||||
|
||||
The ideal gas model as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d7/dfa/classCantera_1_1IdealGasPhase.html#details>`__.
|
||||
|
||||
.. _sec-yaml-ideal-gas-VPSS:
|
||||
|
||||
``ideal-gas-VPSS``
|
||||
------------------
|
||||
|
||||
The ideal gas model, using variable pressure standard state methods as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/dc/ddb/classCantera_1_1IdealSolnGasVPSS.html#details>`__.
|
||||
|
||||
|
||||
.. _sec-yaml-ideal-molal-solution:
|
||||
|
||||
``ideal-molal-solution``
|
||||
------------------------
|
||||
|
||||
A phase based on the mixing-rule assumption that all molality-based activity
|
||||
coefficients are equal to one, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/da/d5c/classCantera_1_1IdealMolalSoln.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``standard-concentration-basis``
|
||||
A string specifying the basis for the standard concentration. One of
|
||||
``unity``, ``species-molar-volume``, or ``solvent-molar-volume``.
|
||||
|
||||
``cutoff``
|
||||
Parameters for cutoff treatments of activity coefficients
|
||||
|
||||
``model``
|
||||
``poly`` or ``polyExp``
|
||||
|
||||
``gamma_o``
|
||||
gamma_o value for the cutoff process at the zero solvent point
|
||||
|
||||
``gamma_k``
|
||||
gamma_k minimum for the cutoff process at the zero solvent point
|
||||
|
||||
``X_o``
|
||||
value of the solute mole fraction that centers the cutoff polynomials
|
||||
for the cutoff = 1 process
|
||||
|
||||
``c_0``
|
||||
Parameter in the polyExp cutoff treatment having to do with rate of
|
||||
exponential decay
|
||||
|
||||
``slope_f``
|
||||
Parameter in the ``polyExp`` cutoff treatment
|
||||
|
||||
``slope_g``
|
||||
Parameter in the ``polyExp`` cutoff treatment
|
||||
|
||||
Example::
|
||||
|
||||
thermo: ideal-molal-solution
|
||||
standard-concentration-basis: solvent-molar-volume
|
||||
cutoff:
|
||||
model: polyexp
|
||||
gamma_o: 0.0001
|
||||
gamma_k: 10.0
|
||||
X_o: 0.2
|
||||
c_0: 0.05
|
||||
slope_f: 0.6
|
||||
slope_g: 0.0
|
||||
|
||||
|
||||
.. _sec-yaml-ideal-condensed:
|
||||
|
||||
``ideal-condensed``
|
||||
-------------------
|
||||
|
||||
A condensed phase ideal solution as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d3/d4c/classCantera_1_1IdealSolidSolnPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``standard-concentration-basis``
|
||||
A string specifying the basis for the standard concentration. One of
|
||||
``unity``, ``species-molar-volume``, or ``solvent-molar-volume``.
|
||||
|
||||
|
||||
.. _sec-yaml-ideal-solution-VPSS:
|
||||
|
||||
``ideal-solution-VPSS``
|
||||
-----------------------
|
||||
|
||||
An ideal solution model using variable pressure standard state methods as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/dc/ddb/classCantera_1_1IdealSolnGasVPSS.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``standard-concentration-basis``
|
||||
A string specifying the basis for the standard concentration. One of
|
||||
``unity``, ``species-molar-volume``, or ``solvent-molar-volume``.
|
||||
|
||||
|
||||
.. _sec-yaml-ideal-surface:
|
||||
|
||||
``ideal-surface``
|
||||
-----------------
|
||||
|
||||
An ideal surface phase, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d2/d95/classCantera_1_1SurfPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``site-density``
|
||||
The molar density of surface sites
|
||||
|
||||
|
||||
.. _sec-yaml-ions-from-neutral-molecule:
|
||||
|
||||
``ions-from-neutral-molecule``
|
||||
------------------------------
|
||||
|
||||
A model that handles the specification of the chemical potentials for ionic
|
||||
species, given a specification of the chemical potentials for the same phase
|
||||
expressed in terms of combinations of the ionic species that represent neutral
|
||||
molecules, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d7/d4a/classCantera_1_1IonsFromNeutralVPSSTP.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``neutral-phase``
|
||||
The ``name`` of the phase definition for the phase containing the neutral
|
||||
molecules.
|
||||
|
||||
Example::
|
||||
|
||||
- name: KCl-ions
|
||||
thermo: ions-from-neutral-molecule
|
||||
neutral-phase: KCl-neutral
|
||||
species: [K+, Cl-]
|
||||
- name: KCl-neutral
|
||||
species: [KCl(l)]
|
||||
thermo: Margules
|
||||
|
||||
|
||||
.. _sec-yaml-lattice:
|
||||
|
||||
``lattice``
|
||||
-----------
|
||||
|
||||
A simple thermodynamic model for a bulk phase, assuming a lattice of solid
|
||||
atoms, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d1/da0/classCantera_1_1LatticePhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``site-density``
|
||||
The molar density of lattice sites
|
||||
|
||||
|
||||
.. _sec-yaml-liquid-water-IAPWS95:
|
||||
|
||||
``liquid-water-IAPWS95``
|
||||
------------------------
|
||||
|
||||
An equation of state for liquid water, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/dc/d86/classCantera_1_1WaterSSTP.html#details>`__.
|
||||
|
||||
|
||||
.. _sec-yaml-Margules:
|
||||
|
||||
``Margules``
|
||||
------------
|
||||
|
||||
A phase employing the Margules approximation for the excess Gibbs free energy, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d7/dfe/classCantera_1_1MargulesVPSSTP.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``interactions``
|
||||
A list of mappings, where each mapping has the following fields:
|
||||
|
||||
``species``
|
||||
A list of two species names
|
||||
|
||||
``excess-enthalpy``
|
||||
A list of two values specifying the first and second excess enthalpy
|
||||
coefficients for the interaction of the specified species. Defaults to
|
||||
[0, 0].
|
||||
|
||||
``excess-entropy``
|
||||
A list of two values specifying the first and second excess entropy
|
||||
coefficients for the interaction of the specified species. Defaults to
|
||||
[0, 0].
|
||||
|
||||
``excess-volume-enthalpy``
|
||||
A list of two values specifying the first and second enthalpy
|
||||
coefficients for the excess volume interaction of the specified species.
|
||||
Defaults to [0, 0].
|
||||
|
||||
``excess-volume-entropy``
|
||||
A list of two values specifying the first and second entropy
|
||||
coefficients for the excess volume interaction of the specified species.
|
||||
Defaults to [0, 0].
|
||||
|
||||
Example::
|
||||
|
||||
thermo: Margules
|
||||
interactions:
|
||||
- species: [KCl(l), LiCl(l)]
|
||||
excess-enthalpy: [-17570, -377]
|
||||
excess-entropy: [-7.627, 4.958]
|
||||
|
||||
|
||||
.. _sec-yaml-Maskell-solid-solution:
|
||||
|
||||
``Maskell-solid-solution``
|
||||
--------------------------
|
||||
|
||||
A condensed phase non-ideal solution with two species, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/dd/d3a/classCantera_1_1MaskellSolidSolnPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``excess-enthalpy``
|
||||
The molar excess enthalpy
|
||||
|
||||
``product-species``
|
||||
String specifying the "product" species
|
||||
|
||||
Example::
|
||||
|
||||
thermo: Maskell-solid-solution
|
||||
excess-enthalpy: 5 J/mol
|
||||
product-species: H(s)
|
||||
|
||||
|
||||
.. _sec-yaml-electron-cloud:
|
||||
|
||||
``electron-cloud``
|
||||
------------------
|
||||
|
||||
A phase representing an electron cloud, such as conduction electrons in a metal,
|
||||
as `described here <https://cantera.org/documentation/dev/doxygen/html/d9/d13/classCantera_1_1MetalPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``density``
|
||||
The density of the bulk metal
|
||||
|
||||
|
||||
.. _sec-yaml-pure-fluid:
|
||||
|
||||
``pure-fluid``
|
||||
--------------
|
||||
|
||||
A phase representing a pure fluid equation of state for one of several species,
|
||||
as `described here <https://cantera.org/documentation/dev/doxygen/html/d1/d29/classCantera_1_1PureFluidPhase.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``pure-fluid-name``
|
||||
Name of the pure fluid model to use:
|
||||
- ``carbondioxide``
|
||||
- ``heptane``
|
||||
- ``hfc134a``
|
||||
- ``hydrogen``
|
||||
- ``methane``
|
||||
- ``nitrogen``
|
||||
- ``oxygen``
|
||||
- ``water``
|
||||
|
||||
|
||||
.. _sec-yaml-Redlich-Kister:
|
||||
|
||||
``Redlich-Kister``
|
||||
------------------
|
||||
|
||||
A phase employing the Redlich-Kister approximation for the excess Gibbs free
|
||||
energy, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d0/d23/classCantera_1_1RedlichKisterVPSSTP.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``interactions``
|
||||
A list of mappings, where each mapping has the following fields:
|
||||
|
||||
``species``
|
||||
A list of two species names
|
||||
|
||||
``excess-enthalpy``
|
||||
A list of polynomial coefficients for the excess enthalpy of the
|
||||
specified binary interaction
|
||||
|
||||
``excess-entropy``
|
||||
A list of polynomial coefficients for the excess entropy of the
|
||||
specified binary interaction
|
||||
|
||||
Example::
|
||||
|
||||
thermo: Redlich-Kister
|
||||
interactions:
|
||||
- species: [Li(C6), V(C6)]
|
||||
excess-enthalpy: [-3.268e+06, 3.955e+06, -4.573e+06, 6.147e+06, -3.339e+06,
|
||||
1.117e+07, 2.997e+05, -4.866e+07, 1.362e+05, 1.373e+08,
|
||||
-2.129e+07, -1.722e+08, 3.956e+07, 9.302e+07, -3.280e+07]
|
||||
excess-entropy: [0.0]
|
||||
|
||||
|
||||
.. _sec-yaml-Redlich-Kwong:
|
||||
|
||||
``Redlich-Kwong``
|
||||
-----------------
|
||||
|
||||
A multi-species Redlich-Kwong phase as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d6/d29/classCantera_1_1RedlichKwongMFTP.html#details>`__.
|
||||
|
||||
The parameters for each species are contained in the corresponding species
|
||||
entries.
|
||||
323
doc/sphinx/yaml/reactions.rst
Normal file
323
doc/sphinx/yaml/reactions.rst
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
.. highlight:: yaml
|
||||
|
||||
.. _sec-yaml-reactions:
|
||||
|
||||
*********
|
||||
Reactions
|
||||
*********
|
||||
|
||||
The fields common to all ``reaction`` entries are:
|
||||
|
||||
``equation``
|
||||
The stoichiometric equation for the reaction. Each term (i.e.,
|
||||
stoichiometric coefficient, species name, ``+`` or ``<=>``) in the equation
|
||||
must be separated by a space.
|
||||
|
||||
Reversible reactions may be written using ``<=>`` or ``=`` to separate
|
||||
reactants and products. Irreversible reacions are written using ``=>``.
|
||||
|
||||
``type``
|
||||
A string specifying the type of reaction or rate coefficient
|
||||
parameterization. The default is ``elementary``. Reaction types are:
|
||||
|
||||
- :ref:`elementary <sec-elementary>`
|
||||
- :ref:`three-body <sec-three-body>`
|
||||
- :ref:`falloff <sec-falloff>`
|
||||
- :ref:`chemically-activated <sec-chemically-activated>`
|
||||
- :ref:`pressure-dependent-Arrhenius <sec-pressure-dependent-Arrhenius>`
|
||||
- :ref:`Chebyshev <sec-Chebyshev>`
|
||||
|
||||
Reactions on surfaces or edges are automatically treated as
|
||||
:ref:`interface <sec-interface-reaction>` reactions, and reactions that
|
||||
involve charge transfer between phases are automatically treated as
|
||||
:ref:`electrochemical <sec-electrochemical-reaction>` reactions, without the
|
||||
need to specify the ``type``.
|
||||
|
||||
``duplicate``
|
||||
Boolean indicating whether the reaction is a known duplicate of another
|
||||
reaction. The default is ``false``.
|
||||
|
||||
``orders``
|
||||
An optional mapping of species to explicit reaction orders to use. Reaction
|
||||
orders for reactant species not explicitly mentioned are taken to be their
|
||||
respective stoichiometric coefficients. See
|
||||
`Reaction orders <https://cantera.org/science/reactions.html#reaction-orders>`__
|
||||
for additional information.
|
||||
|
||||
``negative-orders``
|
||||
Boolean indicating whether negative reaction orders are allowed. The
|
||||
default is ``false``.
|
||||
|
||||
``nonreactant-orders``
|
||||
Boolean indicating whether orders for non-reactant species are allowed.
|
||||
The default is ``false``.
|
||||
|
||||
Depending on the reaction ``type``, other fields may be necessary to specify
|
||||
the rate of the reaction.
|
||||
|
||||
.. _sec-arrhenius:
|
||||
|
||||
Arrhenius expression
|
||||
====================
|
||||
|
||||
Arrhenius expressions can be specified as either a three-element list containing
|
||||
the pre-exponential factor :math:`A`, the temperature exponent :math:`b`, and
|
||||
the activation energy :math:`E_a`, or a mapping containing the fields ``A``,
|
||||
``b``, and ``Ea``. The following are equivalent::
|
||||
|
||||
{A: -2.70000E+13 cm^3/mol/s, b: 0, Ea: 355 cal/mol}
|
||||
[-2.70000E+13 cm^3/mol/s, 0, 355 cal/mol]
|
||||
|
||||
|
||||
.. _sec-efficiencies:
|
||||
|
||||
Efficiencies
|
||||
============
|
||||
|
||||
Some reaction types include parameters for the "efficiency" of different species
|
||||
as third-body colliders. For these reactions, the following additional fields
|
||||
are supported:
|
||||
|
||||
``efficiencies``
|
||||
A mapping of species names to efficiency values
|
||||
|
||||
``default-efficiency``
|
||||
The efficiency for use for species not included in the ``efficiencies``
|
||||
mapping. Defaults to 1.0.
|
||||
|
||||
|
||||
Reaction types
|
||||
==============
|
||||
|
||||
.. _sec-elementary:
|
||||
|
||||
``elementary``
|
||||
--------------
|
||||
|
||||
A homogeneous reaction with a pressure-independent rate coefficient and mass
|
||||
action kinetics, as
|
||||
`described here <https://cantera.org/science/reactions.html#reactions-with-a-pressure-independent-rate>`__.
|
||||
|
||||
Additional fields are:
|
||||
|
||||
``rate-constant``
|
||||
An :ref:`Arrhenius-type <sec-arrhenius>` list or mapping.
|
||||
|
||||
``negative-A``
|
||||
A boolean indicating whether a negative value for the pre-exponential factor
|
||||
is allowed. The default is ``false``.
|
||||
|
||||
Example::
|
||||
|
||||
equation: N + NO <=> N2 + O
|
||||
rate-constant: {A: -2.70000E+13 cm^3/mol/s, b: 0, Ea: 355 cal/mol}
|
||||
negative-A: true
|
||||
|
||||
|
||||
.. _sec-three-body:
|
||||
|
||||
``three-body``
|
||||
--------------
|
||||
|
||||
A three body reaction as
|
||||
`described here <https://cantera.org/science/reactions.html#three-body-reactions>`__.
|
||||
|
||||
The reaction equation should include the third body collision partner ``M``.
|
||||
|
||||
Includes the fields of an ``elementary`` reaction, plus the fields for
|
||||
specifying :ref:`efficiencies <sec-efficiencies>`.
|
||||
|
||||
Example::
|
||||
|
||||
equation: 2 O + M = O2 + M
|
||||
type: three-body
|
||||
rate-constant: [1.20000E+17 cm^6/mol^2/s, -1, 0]
|
||||
efficiencies: {AR: 0.83, H2O: 5}
|
||||
|
||||
|
||||
.. _sec-falloff:
|
||||
|
||||
``falloff``
|
||||
-----------
|
||||
|
||||
A falloff reaction as
|
||||
`described here <https://cantera.org/science/reactions.html#falloff-reactions>`__.
|
||||
|
||||
The reaction equation should include the pressure-dependent third body collision
|
||||
partner ``(+M)`` or ``(+name)`` where ``name`` is the name of a species. The
|
||||
latter case is equivalent to setting the efficiency for ``name`` to 1 and the
|
||||
efficiency for all other species to 0.
|
||||
|
||||
Includes field for specifying :ref:`efficiencies <sec-efficiencies>` as well
|
||||
as:
|
||||
|
||||
``high-P-rate-constant``
|
||||
An :ref:`sec-arrhenius` expression for the high-pressure limit
|
||||
|
||||
``low-P-rate-constant``
|
||||
An :ref:`sec-arrhenius` expression for the low-pressure limit
|
||||
|
||||
``Troe``
|
||||
Parameters for the
|
||||
`Troe <https://cantera.org/science/reactions.html#the-troe-falloff-function>`__
|
||||
falloff function. A mapping containing the keys ``A``, ``T3``, ``T1`` and
|
||||
optionally ``T2``. The default value for ``T2`` is 0.
|
||||
|
||||
``SRI``
|
||||
Parameters for the
|
||||
`SRI <https://cantera.org/science/reactions.html#the-sri-falloff-function>`__
|
||||
falloff function. A mapping containing the keys ``A``, ``B``, ``C``, and
|
||||
optionally ``D`` and ``E``. The default values for ``D`` and ``E`` are 1.0
|
||||
and 0.0, respectively.
|
||||
|
||||
Example::
|
||||
|
||||
equation: H + CH2 (+ N2) <=> CH3 (+N2)
|
||||
type: falloff
|
||||
high-P-rate-constant: [6.00000E+14 cm^3/mol/s, 0, 0]
|
||||
low-P-rate-constant: {A: 1.04000E+26 cm^6/mol^2/s, b: -2.76, Ea: 1600}
|
||||
Troe: {A: 0.562, T3: 91, T1: 5836}
|
||||
|
||||
|
||||
.. _sec-chemically-activated:
|
||||
|
||||
``chemically-activated``
|
||||
------------------------
|
||||
|
||||
A chemically activated reaction as
|
||||
`described here <https://cantera.org/science/reactions.html#chemically-activated-reactions>`__.
|
||||
|
||||
The parameters are the same as for :ref:`sec-falloff` reactions.
|
||||
|
||||
Example::
|
||||
|
||||
equation: CH3 + OH (+M) <=> CH2O + H2 (+M)
|
||||
type: chemically-activated
|
||||
high-P-rate-constant: [5.88E-14, 6.721, -3022.227]
|
||||
low-P-rate-constant: [282320.078, 1.46878, -3270.56495]
|
||||
|
||||
.. _sec-pressure-dependent-Arrhenius:
|
||||
|
||||
``pressure-dependent-Arrhenius``
|
||||
--------------------------------
|
||||
|
||||
A pressure-dependent reaction using multiple Arrhenius expressions as
|
||||
`described here <https://cantera.org/science/reactions.html#pressure-dependent-arrhenius-rate-expressions-p-log>`__.
|
||||
|
||||
The only additional field in this reaction type is:
|
||||
|
||||
``rate-constants``
|
||||
A list of mappings, where each mapping is the mapping form of an
|
||||
:ref:`sec-arrhenius` expression with the addition of a pressure ``P``.
|
||||
|
||||
Example::
|
||||
|
||||
equation: H + CH4 <=> H2 + CH3
|
||||
type: pressure-dependent-Arrhenius
|
||||
rate-constants:
|
||||
- {P: 0.039474 atm, A: 2.720000e+09 cm^3/mol/s, b: 1.2, Ea: 6834.0}
|
||||
- {P: 1.0 atm, A: 1.260000e+20, b: -1.83, Ea: 15003.0}
|
||||
- {P: 1.0 atm, A: 1.230000e+04, b: 2.68, Ea: 6335.0}
|
||||
- {P: 1.01325 MPa, A: 1.680000e+16, b: -0.6, Ea: 14754.0}
|
||||
|
||||
|
||||
.. _sec-Chebyshev:
|
||||
|
||||
``Chebyshev``
|
||||
-------------
|
||||
|
||||
A reaction parameterized as a bivariate Chebyshev polynomial as
|
||||
`described here <https://cantera.org/science/reactions.html#chebyshev-reaction-rate-expressions>`__.
|
||||
|
||||
Additional fields are:
|
||||
|
||||
``temperature-range``
|
||||
A list of two values specifying the minimum and maximum temperatures at
|
||||
which the rate constant is valid
|
||||
|
||||
``pressure-range``
|
||||
A list of two values specifying the minimum and maximum pressures at
|
||||
which the rate constant is valid
|
||||
|
||||
``data``
|
||||
A list of lists containing the Chebyshev coefficients
|
||||
|
||||
Example::
|
||||
|
||||
equation: CH4 <=> CH3 + H
|
||||
type: Chebyshev
|
||||
temperature-range: [290, 3000]
|
||||
pressure-range: [0.0098692326671601278 atm, 98.692326671601279 atm]
|
||||
data: [[-1.44280e+01, 2.59970e-01, -2.24320e-02, -2.78700e-03],
|
||||
[ 2.20630e+01, 4.88090e-01, -3.96430e-02, -5.48110e-03],
|
||||
[-2.32940e-01, 4.01900e-01, -2.60730e-02, -5.04860e-03],
|
||||
[-2.93660e-01, 2.85680e-01, -9.33730e-03, -4.01020e-03],
|
||||
[-2.26210e-01, 1.69190e-01, 4.85810e-03, -2.38030e-03],
|
||||
[-1.43220e-01, 7.71110e-02, 1.27080e-02, -6.41540e-04]]
|
||||
|
||||
|
||||
.. _sec-interface-reaction:
|
||||
|
||||
``interface``
|
||||
-------------
|
||||
|
||||
A reaction occuring on a surface between two bulk phases, or along an edge
|
||||
at the intersection of two surfaces, as
|
||||
`described here <https://cantera.org/science/reactions.html#surface-reactions>`__.
|
||||
|
||||
Includes the fields of an :ref:`sec-elementary` reaction plus:
|
||||
|
||||
``sticking-coefficient``
|
||||
An :ref:`Arrhenius-type <sec-arrhenius>` expression for the sticking coefficient
|
||||
|
||||
``Motz-Wise``
|
||||
A boolean applicable to sticking reactions, indicating whether to use the
|
||||
Motz-Wise correction factor for sticking coefficients near unity. Defaults
|
||||
to ``false``.
|
||||
|
||||
``sticking-species``
|
||||
The name of the sticking species. Required for sticking reactions only if
|
||||
the reaction includes multiple non-surface species.
|
||||
|
||||
``coverage-dependencies``
|
||||
A mapping of species names to coverage dependence parameters, where these
|
||||
parameters are contained in a mapping with the fields:
|
||||
|
||||
``a``
|
||||
Coefficient for exponential dependence on the coverage
|
||||
|
||||
``m``
|
||||
Power-law exponent of coverage dependence
|
||||
|
||||
``E``
|
||||
Activation energy dependence on coverage
|
||||
|
||||
Example::
|
||||
|
||||
equation: 2 H(s) => H2 + 2 Pt(s)
|
||||
rate-constant: {A: 3.7e21 cm^2/mol/s, b: 0, Ea: 67400 J/mol}
|
||||
coverage-dependencies: {H(s): {a: 0, m: 0, E: -6000 J/mol}}
|
||||
|
||||
|
||||
.. _sec-electrochemical-reaction:
|
||||
|
||||
``electrochemical``
|
||||
-------------------
|
||||
|
||||
Interface reactions involving charge transfer between phases,
|
||||
as `described here <https://cantera.org/documentation/dev/doxygen/html/d6/ddd/classCantera_1_1ElectrochemicalReaction.html#details>`__.
|
||||
|
||||
Includes the fields of an :ref:`sec-interface-reaction` reaction, plus:
|
||||
|
||||
``beta``
|
||||
The symmetry factor for the reaction. Default is 0.5.
|
||||
|
||||
``exchange-current-density-formulation``
|
||||
Set to ``true`` if the rate constant parameterizes the exchange current
|
||||
density. Default is ``false``.
|
||||
|
||||
Example::
|
||||
|
||||
equation: LiC6 <=> Li+(e) + C6
|
||||
rate-constant: [5.74, 0.0, 0.0]
|
||||
beta: 0.4
|
||||
471
doc/sphinx/yaml/species.rst
Normal file
471
doc/sphinx/yaml/species.rst
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
.. highlight:: yaml
|
||||
|
||||
.. _sec-yaml-species:
|
||||
|
||||
*******
|
||||
Species
|
||||
*******
|
||||
|
||||
The fields of a ``species`` entry are:
|
||||
|
||||
``name``
|
||||
String identifier used for the species. Required.
|
||||
|
||||
``composition``
|
||||
Mapping that specifies the elemental composition of the species,
|
||||
e.g., ``{C: 1, H: 4}``. Required.
|
||||
|
||||
``thermo``
|
||||
Mapping containing the reference state thermodynamic model specification
|
||||
and parameters. See :ref:`sec-yaml-species-thermo`.
|
||||
|
||||
``equation-of-state``
|
||||
Mapping containing the equation of state model specification for the
|
||||
species, any parameters for that model, and any parameters for interactions
|
||||
with other species. :ref:`sec-yaml-species-eos`. If this field is absent,
|
||||
the ``ideal-gas`` model is assumed.
|
||||
|
||||
``transport``
|
||||
Mapping containing the species transport model specification and
|
||||
parameters. See :ref:`sec-yaml-species-transport`.
|
||||
|
||||
``sites``
|
||||
The number of sites occupied by a surface or edge species. Default is 1.
|
||||
|
||||
``ionic-radius``
|
||||
Size of the species. Used in the Debye-Hückel model.
|
||||
|
||||
``electrolyte-species-type``
|
||||
One of ``solvent``, ``charged-species``, ``weak-acid-associated``,
|
||||
``strong-acid-associated``, ``polar-neutral``, or ``nonpolar-neutral``.
|
||||
The types ``solvent``, ``charged-species``, and ``nonpolar-neutral`` can be
|
||||
inferred automatically. Used in the Debye-Hückel model.
|
||||
|
||||
``weak-acid-charge``
|
||||
Charge to use for species can break apart into charged species. Used in the
|
||||
Debye-Hückel model.
|
||||
|
||||
|
||||
.. _sec-yaml-species-thermo:
|
||||
|
||||
Species thermo models
|
||||
=====================
|
||||
|
||||
Fields of a species ``thermo`` entry used by all models are:
|
||||
|
||||
``model``
|
||||
String specifying the model to be used. Required. Supported model strings
|
||||
are:
|
||||
|
||||
- :ref:`NASA7 <sec-yaml-nasa7>`
|
||||
- :ref:`NASA9 <sec-yaml-nasa9>`
|
||||
- :ref:`Shomate <sec-yaml-shomate>`
|
||||
- :ref:`constant-cp <sec-yaml-constcp>`
|
||||
- :ref:`piecewise-Gibbs <sec-yaml-piecewise-gibbs>`
|
||||
|
||||
``reference-pressure``
|
||||
The reference pressure at which the given thermodynamic properties apply.
|
||||
Defaults to 1 atm.
|
||||
|
||||
|
||||
.. _sec-yaml-nasa7:
|
||||
|
||||
NASA 7-coefficient polynomials
|
||||
------------------------------
|
||||
|
||||
The polynomial form `described here <https://cantera.org/science/science-species.html#the-nasa-7-coefficient-polynomial-parameterization>`__,
|
||||
given for one or two temperature regions. Additional fields of a ``NASA7``
|
||||
thermo entry are:
|
||||
|
||||
``temperature-ranges``
|
||||
A list giving the temperature intervals on which the polynomials are valid.
|
||||
For one temperature region, this list contains the minimum and maximum
|
||||
temperatures for the polynomial. For two temperature regions, this list
|
||||
contains the minimum, intermediate, and maximum temperatures.
|
||||
|
||||
``data``
|
||||
A list with one item per temperature region, where that item is a 7 item
|
||||
list of polynomial coefficients. The temperature regions are arranged in
|
||||
ascending order. Note that this is different from the standard CHEMKIN
|
||||
formulation that uses two temperature regions listed in descending order.
|
||||
|
||||
Example::
|
||||
|
||||
thermo:
|
||||
model: NASA7
|
||||
temperature-ranges: [300.0, 1000.0, 5000.0]
|
||||
data:
|
||||
- [3.298677, 0.0014082404, -3.963222e-06, 5.641515e-09,
|
||||
-2.444854e-12, -1020.8999, 3.950372]
|
||||
- [2.92664, 0.0014879768, -5.68476e-07, 1.0097038e-10,
|
||||
-6.753351e-15, -922.7977, 5.980528]
|
||||
|
||||
|
||||
.. _sec-yaml-nasa9:
|
||||
|
||||
NASA 9-coefficient polynomials
|
||||
------------------------------
|
||||
|
||||
The polynomial form `described here <https://cantera.org/science/science-species.html#the-nasa-9-coefficient-polynomial-parameterization>`__,
|
||||
given for any number of temperature regions. Additional fields of a ``NASA9``
|
||||
thermo entry are:
|
||||
|
||||
``temperature-ranges``
|
||||
A list giving the temperature intervals on which the polynomials are valid.
|
||||
This list contains the minimum temperature, the intermediate temperatures
|
||||
between each set pair of regions, and the maximum temperature.
|
||||
|
||||
``data``
|
||||
A list with one item per temperature region, where that item is a 9 item
|
||||
list of polynomial coefficients. The temperature regions are arranged in
|
||||
ascending order.
|
||||
|
||||
Example::
|
||||
|
||||
thermo:
|
||||
model: NASA9
|
||||
temperature-ranges: [200.00, 1000.00, 6000.0, 20000]
|
||||
reference-pressure: 1 bar
|
||||
data:
|
||||
- [2.210371497E+04, -3.818461820E+02, 6.082738360E+00, -8.530914410E-03,
|
||||
1.384646189E-05, -9.625793620E-09, 2.519705809E-12, 7.108460860E+02,
|
||||
-1.076003744E+01]
|
||||
- [5.877124060E+05, -2.239249073E+03, 6.066949220E+00, -6.139685500E-04,
|
||||
1.491806679E-07, -1.923105485E-11, 1.061954386E-15, 1.283210415E+04,
|
||||
-1.586640027E+01]
|
||||
- [8.310139160E+08, -6.420733540E+05, 2.020264635E+02, -3.065092046E-02,
|
||||
2.486903333E-06, -9.705954110E-11, 1.437538881E-15, 4.938707040E+06,
|
||||
-1.672099740E+03]
|
||||
|
||||
.. _sec-yaml-shomate:
|
||||
|
||||
Shomate polynomials
|
||||
-------------------
|
||||
|
||||
The polynomial form `described here <https://cantera.org/science/science-species.html#the-shomate-parameterization>`__,
|
||||
given for one or two temperature regions. Additional fields of a ``Shomate``
|
||||
thermo entry are:
|
||||
|
||||
``temperature-ranges``
|
||||
A list giving the temperature intervals on which the polynomials are valid.
|
||||
For one temperature region, this list contains the minimum and maximum
|
||||
temperatures for the polynomial. For two temperature regions, this list
|
||||
contains the minimum, intermediate, and maximum temperatures.
|
||||
|
||||
``data``
|
||||
A list with one item per temperature region, where that item is a 7 item
|
||||
list of polynomial coefficients. The temperature regions are arranged in
|
||||
ascending order.
|
||||
|
||||
Example::
|
||||
|
||||
thermo:
|
||||
model: Shomate
|
||||
temperature-ranges: [298, 1300, 6000]
|
||||
data:
|
||||
- [25.56759, 6.096130, 4.054656, -2.671301, 0.131021,
|
||||
-118.0089, 227.3665]
|
||||
- [35.15070, 1.300095, -0.205921, 0.013550, -3.282780,
|
||||
-127.8375, 231.7120]
|
||||
|
||||
|
||||
.. _sec-yaml-constcp:
|
||||
|
||||
Constant heat capacity
|
||||
----------------------
|
||||
|
||||
The constant heat capacity model `described here <https://cantera.org/science/science-species.html#constant-heat-capacity>`__.
|
||||
Additional fields of a ``constant-cp`` thermo entry are:
|
||||
|
||||
``T0``
|
||||
The reference temperature. Defaults to 298.15 K.
|
||||
|
||||
``h0``
|
||||
The molar enthalpy at the reference temperature. Defaults to 0.0.
|
||||
|
||||
``s0``
|
||||
The molar entropy at the reference temperature. Defaults to 0.0.
|
||||
|
||||
``cp0``
|
||||
The heat capacity at constant pressure. Defaults to 0.0.
|
||||
|
||||
Example::
|
||||
|
||||
thermo:
|
||||
model: constant-cp
|
||||
T0: 1000 K
|
||||
h0: 9.22 kcal/mol
|
||||
s0: -3.02 cal/mol/K
|
||||
cp0: 5.95 cal/mol/K
|
||||
|
||||
.. _sec-yaml-piecewise-gibbs:
|
||||
|
||||
Piecewise Gibbs
|
||||
---------------
|
||||
|
||||
A model based on piecewise interpolation of the Gibbs free energy as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d4/d9e/classCantera_1_1Mu0Poly.html#details>`__
|
||||
Additional fields of a ``piecewise-Gibbs`` entry are:
|
||||
|
||||
``h0``
|
||||
The molar enthalpy at the reference temperature of 298.15 K. Defaults to
|
||||
0.0.
|
||||
|
||||
``dimensionless``
|
||||
A boolean flag indicating whether the values of the Gibbs free energy are
|
||||
given in a dimensionless form, i.e., divided by :math:`RT`. Defaults to
|
||||
``false``.
|
||||
|
||||
``data``
|
||||
A mapping of temperatures to values of the Gibbs free energy. The Gibbs free
|
||||
energy can be either in molar units (if ``dimensionless`` is ``false``) or
|
||||
nondimensionalized by the corresponding temperature (if ``dimensionless`` is
|
||||
``true``). A value must be provided at :math:`T^\circ = 298.15` K.
|
||||
|
||||
Example::
|
||||
|
||||
thermo:
|
||||
model: piecewise-Gibbs
|
||||
h0: -230.015 kJ/mol
|
||||
dimensionless: true
|
||||
data: {298.15: -91.50963, 333.15: -85.0}
|
||||
|
||||
|
||||
.. _sec-yaml-species-eos:
|
||||
|
||||
Species equation of state models
|
||||
================================
|
||||
|
||||
``model``
|
||||
String specifying the model to be used. Required. Supported model strings
|
||||
are:
|
||||
|
||||
- :ref:`constant-volume <sec-yaml-eos-constant-volume>`
|
||||
- :ref:`density-temperature-polynomial <sec-yaml-eos-density-temperature-polynomial>`
|
||||
- :ref:`HKFT <sec-yaml-eos-hkft>`
|
||||
- :ref:`ideal-gas <sec-yaml-eos-ideal-gas>`
|
||||
- :ref:`ions-from-neutral-molecule <sec-yaml-eos-ions-from-neutral>`
|
||||
- :ref:`liquid-water-IAPWS95 <sec-yaml-eos-liquid-water-iapws95>`
|
||||
- :ref:`molar-volume-temperature-polynomial <sec-yaml-eos-molar-volume-temperature-polynomial>`
|
||||
- :ref:`Redlich-Kwong <sec-yaml-eos-redlich-kwong>`
|
||||
|
||||
|
||||
.. _sec-yaml-eos-constant-volume:
|
||||
|
||||
Constant volume
|
||||
---------------
|
||||
|
||||
A constant volume model as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/da/d33/classCantera_1_1PDSS__ConstVol.html#details>`__.
|
||||
|
||||
Any one of the following may be specified:
|
||||
|
||||
``molar-volume``
|
||||
The molar volume of the species.
|
||||
|
||||
``molar-density``
|
||||
The molar density of the species.
|
||||
|
||||
``density``
|
||||
The mass density of the species.
|
||||
|
||||
Example::
|
||||
|
||||
equation-of-state:
|
||||
model: constant-volume
|
||||
molar-volume: 1.3 cm^3/mol
|
||||
|
||||
|
||||
.. _sec-yaml-eos-density-temperature-polynomial:
|
||||
|
||||
Density temperature polynomial
|
||||
------------------------------
|
||||
|
||||
A model in which the density varies with temperature as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d0/d2f/classCantera_1_1PDSS__SSVol.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``data``
|
||||
Vector of 4 coefficients for a cubic polynomial in temperature
|
||||
|
||||
Example::
|
||||
|
||||
equation-of-state:
|
||||
model: density-temperature-polynomial
|
||||
units: {mass: g, length: cm}
|
||||
data: [0.536504, -1.04279e-4, 3.84825e-9, -5.2853e-12]
|
||||
|
||||
|
||||
.. _sec-yaml-eos-hkft:
|
||||
|
||||
HKFT
|
||||
----
|
||||
|
||||
The Helgeson-Kirkham-Flowers-Tanger model as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d9/d18/classCantera_1_1PDSS__HKFT.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``h0``
|
||||
Enthalpy of formation at the reference temperature and pressure
|
||||
|
||||
``s0``
|
||||
Entropy of formation at the reference temperature and pressure
|
||||
|
||||
``a``
|
||||
4-element vector containing the coefficients :math:`a_1, \ldots , a_4`
|
||||
|
||||
``c``
|
||||
2-element vector containing the coefficients :math:`c_1` and :math:`c_2`
|
||||
|
||||
``omega``
|
||||
The :math:`\omega` parameter at the reference temperature and pressure
|
||||
|
||||
Example::
|
||||
|
||||
equation-of-state:
|
||||
model: HKFT
|
||||
h0: -57433. cal/gmol
|
||||
s0: 13.96 cal/gmol/K
|
||||
a: [0.1839 cal/gmol/bar, -228.5 cal/gmol,
|
||||
3.256 cal*K/gmol/bar, -27260. cal*K/gmol]
|
||||
c: [18.18 cal/gmol/K, -29810. cal*K/gmol]
|
||||
omega: 33060 cal/gmol
|
||||
|
||||
|
||||
.. _sec-yaml-eos-ideal-gas:
|
||||
|
||||
Ideal gas
|
||||
---------
|
||||
|
||||
A species using the ideal gas equation of state, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/df/d31/classCantera_1_1PDSS__IdealGas.html#details>`__.
|
||||
This model is the default if no ``equation-of-state`` section is included.
|
||||
|
||||
|
||||
.. _sec-yaml-eos-ions-from-neutral:
|
||||
|
||||
Ions from neutral molecule
|
||||
--------------------------
|
||||
|
||||
A species equation of state model used with the ``ions-from-neutral-molecule``
|
||||
phase model, as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d5/df4/classCantera_1_1PDSS__IonsFromNeutral.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``special-species``
|
||||
Boolean indicating whether the species is the "special species" in the
|
||||
phase. Default is ``false``.
|
||||
|
||||
``multipliers``
|
||||
A dictionary mapping species to neutral species multiplier values.
|
||||
|
||||
Example::
|
||||
|
||||
equation-of-state:
|
||||
model: ions-from-neutral-molecule
|
||||
multipliers: {KCl(l): 1.2}
|
||||
|
||||
|
||||
.. _sec-yaml-eos-liquid-water-iapws95:
|
||||
|
||||
Liquid Water IAPWS95
|
||||
--------------------
|
||||
|
||||
A detailed equation of state for liquid water as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/de/d64/classCantera_1_1PDSS__Water.html#details>`__.
|
||||
|
||||
|
||||
.. _sec-yaml-eos-molar-volume-temperature-polynomial:
|
||||
|
||||
Molar volume temperature polynomial
|
||||
-----------------------------------
|
||||
|
||||
A model in which the molar volume varies with temperature as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d0/d2f/classCantera_1_1PDSS__SSVol.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``data``
|
||||
Vector of 4 coefficients for a cubic polynomial in temperature
|
||||
|
||||
|
||||
.. _sec-yaml-eos-redlich-kwong:
|
||||
|
||||
Redlich-Kwong
|
||||
-------------
|
||||
|
||||
A model where species follow the Redlich-Kwong equation of state as
|
||||
`described here <https://cantera.org/documentation/dev/doxygen/html/d6/d29/classCantera_1_1RedlichKwongMFTP.html#details>`__.
|
||||
|
||||
Additional fields:
|
||||
|
||||
``a``
|
||||
Pure-species ``a`` coefficient. Scalar or list of two values for a
|
||||
temperature-dependent expression.
|
||||
|
||||
``b``
|
||||
Pure-species ``b`` coefficient.
|
||||
|
||||
``binary-a``
|
||||
Mapping where the keys are species and the values are the ``a``
|
||||
coefficients for binary interactions between the two species.
|
||||
|
||||
|
||||
.. _sec-yaml-species-transport:
|
||||
|
||||
Species transport models
|
||||
========================
|
||||
|
||||
``model``
|
||||
String specifying the model type. The only model that is specifically
|
||||
handled is ``gas``.
|
||||
|
||||
Gas transport
|
||||
-------------
|
||||
|
||||
Species transport properties are a rare exception to Cantera's use of SI units,
|
||||
and use the units in which these properties are customarily reported. No
|
||||
conversions are supported.
|
||||
|
||||
The additional fields of a ``gas`` transport entry are:
|
||||
|
||||
``geometry``
|
||||
A string specifying the geometry of the molecule. One of ``atom``,
|
||||
``linear``, or ``nonlinear``.
|
||||
|
||||
``diameter``
|
||||
The Lennard-Jones collision diameter [Å]
|
||||
|
||||
``well-depth``
|
||||
The Lennard-Jones well depth [K]
|
||||
|
||||
``dipole``
|
||||
The permanent dipole moment [Debye]. Default 0.0.
|
||||
|
||||
``polarizability``
|
||||
The dipole polarizability [Å^3]. Default 0.0.
|
||||
|
||||
``rotational-relaxation``
|
||||
The rotational relaxation collision number at 298 K [-]. Default 0.0.
|
||||
|
||||
``acentric-factor``
|
||||
Pitzer's acentric factor [-]. Default 0.0.
|
||||
|
||||
``dispersion-coefficient``
|
||||
The dispersion coefficient, normalized by :math:`e^2` [Å^5]. Default 0.0.
|
||||
|
||||
``quadrupole-polarizability``
|
||||
The quadrupole polarizability [Å^5]. Default 0.0.
|
||||
|
||||
Example::
|
||||
|
||||
transport:
|
||||
model: gas
|
||||
geometry: linear
|
||||
well-depth: 107.4
|
||||
diameter: 3.458
|
||||
polarizability: 1.6
|
||||
rotational-relaxation: 3.8
|
||||
|
|
@ -2,6 +2,7 @@ from buildutils import *
|
|||
|
||||
Import('env', 'build', 'install', 'libraryTargets')
|
||||
localenv = env.Clone()
|
||||
copyenv = localenv.Clone() # no CPPPATH addition, to avoid circular dependencies
|
||||
|
||||
license_files = [('Cantera', '#License.txt'),
|
||||
('Libexecstream', 'libexecstream/doc/license.txt')]
|
||||
|
|
@ -18,30 +19,36 @@ def prep_default(env):
|
|||
|
||||
def prep_gtest(env):
|
||||
localenv = prep_default(env)
|
||||
localenv.Prepend(CPPPATH=[Dir('#ext/googletest'),
|
||||
Dir('#ext/googletest/include')],
|
||||
CPPDEFINES={'GTEST_HAS_PTHREAD': 0})
|
||||
localenv.Prepend(CPPPATH=[Dir('#ext/googletest/googletest'),
|
||||
Dir('#ext/googletest/googletest/include')],
|
||||
CPPDEFINES={'GTEST_HAS_PTHREAD': 0})
|
||||
return localenv
|
||||
|
||||
def prep_fmt(env):
|
||||
|
||||
def prep_gmock(env):
|
||||
localenv = prep_default(env)
|
||||
if not env['system_fmt']:
|
||||
license_files.append(('fmtlib', 'fmt/LICENSE.rst'))
|
||||
for name in ('format.h', 'ostream.h'):
|
||||
build(localenv.Command("#include/cantera/ext/fmt/" + name,
|
||||
"#ext/fmt/fmt/" + name,
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
localenv.Prepend(CPPPATH=[Dir('#ext/googletest/googletest/include'),
|
||||
Dir('#ext/googletest/googlemock'),
|
||||
Dir('#ext/googletest/googlemock/include')],
|
||||
CPPDEFINES={'GTEST_HAS_PTHREAD': 0})
|
||||
return localenv
|
||||
|
||||
|
||||
# each element of libs is: (subdir, (file extensions), prepfunction)
|
||||
libs = [('libexecstream', ['cpp'], prep_default),
|
||||
('fmt/fmt', ['cc'], prep_fmt)]
|
||||
libs = [('libexecstream', ['cpp'], prep_default)]
|
||||
|
||||
for subdir, extensions, prepFunction in libs:
|
||||
localenv = prepFunction(env)
|
||||
objects = localenv.SharedObject(mglob(localenv, subdir, *extensions))
|
||||
libraryTargets.extend(objects)
|
||||
|
||||
if not env['system_fmt']:
|
||||
license_files.append(('fmtlib', 'fmt/LICENSE.rst'))
|
||||
for name in ('format.h', 'ostream.h', 'printf.h', 'core.h', 'format-inl.h'):
|
||||
build(copyenv.Command("#include/cantera/ext/fmt/" + name,
|
||||
"#ext/fmt/include/fmt/" + name,
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
|
||||
if env['system_sundials'] == 'n':
|
||||
localenv = prep_default(env)
|
||||
localenv.Prepend(CPPPATH=Dir('#include/cantera/ext'))
|
||||
|
|
@ -58,31 +65,55 @@ if env['system_sundials'] == 'n':
|
|||
ConfigBuilder(sundials_configh)))
|
||||
|
||||
# Copy sundials header files into common include directory
|
||||
for subdir in ('sundials', 'nvector', 'cvodes', 'ida'):
|
||||
for subdir in ('sundials', 'nvector', 'cvodes', 'ida', 'sunmatrix', 'sunlinsol'):
|
||||
for header in mglob(env, 'sundials/include/'+subdir, 'h'):
|
||||
build(localenv.Command('#include/cantera/ext/%s/%s' % (subdir, header.name),
|
||||
'#ext/sundials/include/%s/%s' % (subdir, header.name),
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
build(copyenv.Command('#include/cantera/ext/%s/%s' % (subdir, header.name),
|
||||
'#ext/sundials/include/%s/%s' % (subdir, header.name),
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
|
||||
# Compile Sundials source files
|
||||
exclude = ['_klu', '_superlumt']
|
||||
if not env['use_lapack']:
|
||||
exclude.append('_lapack')
|
||||
for subdir in ('sundials', 'nvec_ser', 'cvodes', 'ida'):
|
||||
subdirs = ['sundials', 'nvec_ser', 'cvodes', 'ida', 'sunmat_band',
|
||||
'sunmat_dense', 'sunmat_sparse', 'sunlinsol_dense',
|
||||
'sunlinsol_band','sunlinsol_spgmr']
|
||||
if env['use_lapack']:
|
||||
subdirs.extend(('sunlinsol_lapackdense', 'sunlinsol_lapackband'))
|
||||
|
||||
for subdir in subdirs:
|
||||
libraryTargets.extend(localenv.SharedObject(
|
||||
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')
|
||||
if not any(pattern in f.name for pattern in exclude)]))
|
||||
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')]))
|
||||
|
||||
if not env['system_yamlcpp']:
|
||||
localenv = prep_default(env)
|
||||
localenv.Prepend(CPPPATH=Dir('#include/cantera/ext'))
|
||||
license_files.append(('YAML-CPP', 'yaml-cpp/LICENSE'))
|
||||
|
||||
# Copy header files into common include directory
|
||||
for subdir in ('', 'contrib', 'node', 'node/detail'):
|
||||
for header in mglob(env, 'yaml-cpp/include/yaml-cpp/'+subdir, 'h'):
|
||||
h = build(localenv.Command('#include/cantera/ext/yaml-cpp/{}/{}'.format(subdir, header.name),
|
||||
'#ext/yaml-cpp/include/yaml-cpp/{}/{}'.format(subdir, header.name),
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
|
||||
# Compile yaml-cpp source files
|
||||
for subdir in ('', 'contrib'):
|
||||
libraryTargets.extend(localenv.SharedObject(
|
||||
[f for f in mglob(localenv, 'yaml-cpp/src/'+subdir, 'cpp')]))
|
||||
|
||||
|
||||
if not env['system_eigen']:
|
||||
license_files.append(('Eigen', 'eigen/COPYING.MPL2'))
|
||||
build(localenv.Command('#include/cantera/ext/Eigen', '#ext/eigen/Eigen',
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
h = build(copyenv.Command('#include/cantera/ext/Eigen', '#ext/eigen/Eigen',
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
copyenv.Depends(copyenv['config_h_target'], h)
|
||||
|
||||
# Google Test: Used internally for Cantera unit tests.
|
||||
if not env['system_googletest']:
|
||||
if env['googletest'] == 'submodule':
|
||||
localenv = prep_gtest(env)
|
||||
gtest = build(localenv.Library('../lib/gtest',
|
||||
source=['googletest/src/gtest-all.cc']))
|
||||
source=['googletest/googletest/src/gtest-all.cc']))
|
||||
localenv = prep_gmock(env)
|
||||
gmock = build(localenv.Library('../lib/gmock',
|
||||
source=['googletest/googlemock/src/gmock-all.cc']))
|
||||
|
||||
# Create license file containing licenses for Cantera and all included packages
|
||||
def generate_license(target, source, env):
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c6ef117db0a5d72ad0b0239ab1f6dfc3291c398e
|
||||
Subproject commit dde02fceedfc1ba09d4d4f71a2b5dafcfcb85491
|
||||
2
ext/fmt
2
ext/fmt
|
|
@ -1 +1 @@
|
|||
Subproject commit 7fa8f8fa48b0903deab5bb42e6760477173ac485
|
||||
Subproject commit 5386f1df20392a08844f5034e8436c6ec7ce0b03
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue