CanteraError thrown by CVodesIntegrator::step:
CVodes error encountered. Error code: -3
At t = 0.0360421 and h = 2.78419e-10, the error test failed repeatedly or with |h| = hmin.
Components with largest weighted error estimates:
24: 28.692318112061425
22: -8.029918980116443
6: 1.437750950083966
20: -0.4254972058861584
21: -0.11142008342470497
16: 0.07109609893413864
38: -0.04408107403003456
2: 0.026583024432490516
19: 0.023232697130210336
44: -0.00450484642134545
***********************************************************************
import pandas as pd
import numpy as np
import time
import cantera as ct
import matplotlib.pyplot as plt
ct.add_directory('../../')
mech = 'HPMech'
print('Importing %s.yaml...'%mech)
gas = ct.Solution('%s.yaml'%mech, 'gas')
print('Done.')
gas.TPX = 900, 100*ct.one_atm, 'CH4:2.9,O2:4.24,H2O:92.86'
r = ct.ConstPressureReactor(contents=gas)
reactorNetwork = ct.ReactorNet([r])
#columnNames = [r.component_name(item) for item in range(r.n_vars)]
#timeHistory = pd.DataFrame(columns=columnNames)
timeHistory = ct.SolutionArray(gas,extra=['t'])
################################################ run sim
tic = time.time()
tau_est = 295*0.6/900 # s
t = 0
counter = 1
while(t < tau_est):
t = reactorNetwork.step()
if (counter%1 == 0):
#timeHistory.loc[t] = reactorNetwork.get_state()
timeHistory.append(r.thermo.state,t=t)
#timeHistory.append(reactorNetwork.get_state(),t=t)
print('step %i done, t = %.3e...'%(counter,t))
counter += 1
toc = time.time()
print('Took {:3.2f} s'.format(toc-tic))
timeHistory.write_csv('adiabatic900-100-VirialCH4wrong.csv',cols=('t','T','P','volume_mole','X'))
###########################################################################