Richard West
|
356b4af0ff
|
New formula: Cantera 1.8
Cantera is a suite of object-oriented software tools for problems involving
chemical kinetics, thermodynamics, and/or transport processes.
This formula gets the 1.8.0-beta source from the google code site,
http://code.google.com/p/cantera/ and builds it the way I want it: 64-bit
architecture with the full python package and numpy.
A simple 'brew install cantera' gives me:
/usr/local/Cellar/cantera/1.8.0b: 668 files, 30M, built in 5.5 minutes
I can then do the following demo (using a homebrew python) which uses the
GRI-Mech 3.0 kinetic model to find the equilibrium composition of a
stoichiometric mixture of methane and air at 1000 Kelvin and 1 atmosphere:
macbookpro:~ rwest$ python
Python 2.7 (r27:82500, Aug 16 2010, 14:45:41)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Cantera
>>> g=Cantera.GRI30()
>>> g.set(X='CH4:1, O2:2, N2:8', T=1000, P=Cantera.OneAtm)
>>> g.equilibrate('TP')
>>> g
gri30:
temperature 1000 K
pressure 101325 Pa
density 0.336957 kg/m^3
mean mol. weight 27.6498 amu
1 kg 1 kmol
----------- ------------
enthalpy -2.03847e+06 -5.636e+07 J
internal energy -2.33917e+06 -6.468e+07 J
entropy 8643.6 2.39e+05 J/K
Gibbs function -1.06821e+07 -2.954e+08 J
heat capacity c_p 1311.88 3.627e+04 J/K
heat capacity c_v 1011.18 2.796e+04 J/K
X Y Chem. Pot. / RT
------------- ------------ ------------
H2 7.61286e-08 5.55034e-09 -33.8964
H 6.26175e-13 2.28264e-14 -16.9482
O 3.28152e-14 1.89883e-14 -21.7574
O2 4.3563e-08 5.04148e-08 -43.5148
OH 3.30789e-09 2.03467e-09 -38.7056
H2O 0.181818 0.118464 -55.6538
HO2 1.22441e-14 1.46163e-14 -60.463
H2O2 1.0757e-13 1.32332e-13 -77.4112
C 2.27652e-44 9.88915e-45 -34.5822
CH 5.81653e-44 2.73871e-44 -51.5304
CH2 8.38153e-40 4.25199e-40 -68.4786
CH2(S) 4.46855e-42 2.26692e-42 -68.4786
CH3 3.45038e-34 1.87617e-34 -85.4268
CH4 2.42853e-30 1.40906e-30 -102.375
CO 2.6519e-08 2.68649e-08 -56.3396
CO2 0.0909091 0.144698 -78.0969
HCO 5.1743e-22 5.4304e-22 -73.2878
CH2O 1.12139e-21 1.21778e-21 -90.2359
CH2OH 3.08627e-32 3.46403e-32 -107.184
CH3O 7.46237e-35 8.37578e-35 -107.184
CH3OH 4.44146e-30 5.14701e-30 -124.132
C2H 2.34749e-55 2.12506e-55 -86.1125
C2H2 1.673e-45 1.57547e-45 -103.061
C2H3 8.12731e-55 7.94977e-55 -120.009
C2H4 6.60022e-50 6.69664e-50 -136.957
C2H5 4.98569e-59 5.24027e-59 -153.905
C2H6 1.36667e-56 1.48628e-56 -170.854
HCCO 1.87989e-42 2.78955e-42 -107.87
CH2CO 4.03465e-38 6.13407e-38 -124.818
HCCOH 6.9093e-45 1.05045e-44 -124.818
N 2.53717e-22 1.28527e-22 -12.5845
NH 5.98875e-22 3.25207e-22 -29.5327
NH2 8.37524e-20 4.85331e-20 -46.4809
NH3 1.04731e-14 6.45078e-15 -63.4291
NNH 2.69259e-19 2.82616e-19 -42.1172
NO 1.37659e-08 1.49391e-08 -34.3419
NO2 3.38433e-13 5.63106e-13 -56.0993
N2O 1.09383e-12 1.74115e-12 -46.9264
HNO 5.09799e-16 5.71828e-16 -51.2901
CN 9.63391e-33 9.06525e-33 -47.1667
HCN 8.91222e-24 8.71104e-24 -64.1149
H2CN 6.76004e-36 6.85387e-36 -81.063
HCNN 1.39332e-43 2.0677e-43 -76.6993
HCNO 8.54635e-33 1.32987e-32 -85.8722
HOCN 2.37596e-23 3.69716e-23 -85.8722
HNCO 7.70146e-18 1.1984e-17 -85.8722
NCO 3.47359e-24 5.27852e-24 -68.924
N2 0.727273 0.736838 -25.169
AR 0 0
C3H7 9.64128e-85 1.50247e-84 -222.384
C3H8 2.79983e-82 4.46523e-82 -239.332
CH2CHO 8.72194e-48 1.35783e-47 -141.766
CH3CHO 3.16573e-45 5.04381e-45 -158.715
>>>
Signed-off-by: David Höppner <0xffea@gmail.com>
* use snow_leopard_64?
* remove version
|
2010-09-01 11:39:33 +02:00 |
|