# Cantera: why happens it?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 27, 2010, 05:54 Cantera: why happens it? #1 New Member   Join Date: Jun 2010 Posts: 2 Rep Power: 0 If I put this code in matlab: Code: ```gas = GRI30; set(gas,'T',800.0,'P',15*oneatm,'X','H2:0.3971,H2O2:0.397,H2O:0.083,N2:0.032'); r1=Reactor(gas); a = IdealGasMix('air.cti'); setPressure(a,15*OneAtm); env = Reservoir(gas); wall=Wall; setHeatTransferCoeff(wall,0); setExpansionRateCoeff(wall, 1.0e6); setArea(wall, 1.0); install(wall,r1,env); sim=ReactorNet({r1}); time=0.0; dt=0.0001; tfinal=0.01; while time < tfinal p=plot(time,temperature(r1),'go'); set(p,'Color','blue','LineWidth',2) time = time + dt; advance(sim,time); hold on end``` The resulting gas mix is: Code: ``` H2 0.0802358 0.00945856 -20.7827 H 0.0157446 0.000928023 -10.3913 O 0.00653354 0.00611286 -15.6992 O2 0.0250759 0.0469227 -31.3984 OH 0.0550284 0.0547288 -26.0906 H2O 0.782684 0.824554 -36.4819 HO2 5.70116e-005 0.000110042 -41.7898 H2O2 9.74139e-006 1.93767e-005 -52.1811 C 1.75036e-035 1.22941e-035 -72.1742 CH 7.01569e-036 5.34119e-036 -82.6057 CH2 1.37287e-035 1.12611e-035 -93.0415 CH2(S) 1.41046e-036 1.15694e-036 -93.0779 CH3 3.40071e-035 2.98992e-035 -103.534 CH4 1.13184e-035 1.06183e-035 -113.926 CO 1.75606e-025 2.87642e-025 -87.8635 CO2 2.25237e-025 5.7967e-025 -103.563 HCO 2.89359e-030 4.91024e-030 -98.2548 CH2O 8.71031e-032 1.52942e-031 -108.646 CH2OH 2.09601e-035 3.80387e-035 -119.052 CH3O 5.43185e-037 9.85782e-037 -119.068 CH3OH 1.71918e-036 3.22133e-036 -129.474 C2H 1.10875e-057 1.62287e-057 -140.852 C2H2 3.00051e-056 4.56871e-056 -151.193 C2H3 -1.37201e-057 -2.16995e-057 C2H4 -1.60576e-057 -2.63429e-057 C2H5 -8.52573e-058 -1.44892e-057 C2H6 1.17001e-058 2.05736e-058 -179.221 HCCO 4.17628e-057 1.00202e-056 -160.984 CH2CO -2.51789e-057 -6.1896e-057 HCCOH 1.17124e-057 2.8792e-057 -167.55 N 1.21541e-006 9.95521e-007 -14.634 NH 5.50854e-007 4.83665e-007 -25.0253 NH2 3.04028e-007 2.84865e-007 -35.4167 NH3 3.97725e-007 3.96099e-007 -45.808 NNH 2.72282e-008 4.62093e-008 -39.6593 NO 0.00370562 0.00650224 -30.3332 NO2 2.68585e-006 7.22576e-006 -46.0324 N2O 1.62991e-007 4.19504e-007 -44.9672 HNO 1.62198e-006 2.94169e-006 -40.7245 CN 5.6591e-034 8.61011e-034 -86.7982 HCN 2.81108e-032 4.44265e-032 -97.1896 H2CN 8.23405e-037 1.34985e-036 -107.581 HCNN 2.61298e-040 6.26982e-040 -111.874 HCNO 2.60158e-036 6.54562e-036 -112.918 HOCN 1.55153e-033 3.90369e-033 -112.889 HNCO 1.15489e-031 2.90571e-031 -112.889 NCO 1.20418e-032 2.95876e-032 -102.497 N2 0.0309188 0.0506502 -29.2679 AR 0 0 C3H7 5.12899e-079 1.29237e-078 -231.774 C3H8 1.40577e-079 3.62502e-079 -240.589 CH2CHO -3.05942e-058 -7.70116e-058 CH3CHO -1.59432e-056 -4.10718e-056``` But if at t=0 there isn't carbonium element, it cannot be never. I can see that unwanted species have a very low exponent (-30 etc.) but why the result is not zero ? May be I do something wrong ? Thank you.

 April 23, 2012, 15:53 #2 Member   John M. Join Date: Jul 2011 Posts: 57 Rep Power: 6 Didn't you set initial state mole fractions in .cti file? Note, your total mole frac. sum, is not equal to 1. See manual, how Cantera works in this case - does it normalize mole fractions?

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hellorishi OpenFOAM Running, Solving & CFD 108 April 17, 2015 02:47 markusrehm OpenFOAM 20 October 13, 2010 17:02 Claud FLUENT 22 May 17, 2010 16:54 aat OpenFOAM Running, Solving & CFD 2 January 12, 2010 08:35

All times are GMT -4. The time now is 04:02.