Closed davidfarinajr closed 6 years ago
So this has some unexpected behavior involved, but as you've already guessed it's likely a symptom of a much more concerning problem related to rates and thermo. Model Resurrection is a method we use to continue a run after the solver errors. Instead of simply ending the RMG run we grab the highest flux edge species (and sometimes some other objects) and add them to the model (core). In theory if the solver failure isn't a fundamental issue with the thermo/kinetics the model will recover after a resurrection or two. If not it will keep resurrecting itself in an attempt to recover. The unexpected behavior here is that it's unable to find any edge species to grab since your edge species net rates are empty.
This is likely the same issue as #1258, which we were unable to solve because we didn't have a test case we could easily reproduce the error from. If I can access the database branch you're using and if you can send me your input file I should be able to debug it.
database: https://github.com/davidfarinajr/RMG-database/tree/Chlorine
input:
database(
thermoLibraries = ['Chlorinated_Hydrocarbons', 'primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
species(
label = "CH3Cl",
reactive = True,
structure = adjacencyList(
"""
1 Cl u0 p3 c0 {2,S}
2 C u0 p0 c0 {1,S} {3,S} {4,S} {5,S}
3 H u0 p0 c0 {2,S}
4 H u0 p0 c0 {2,S}
5 H u0 p0 c0 {2,S}
"""),
)
species(
label = "H2",
reactive = True,
structure = adjacencyList(
"""
1 H u0 p0 c0 {2,S}
2 H u0 p0 c0 {1,S}
"""),
)
species(
label = "O2",
reactive = True,
structure = adjacencyList(
"""
multiplicity 3
1 O u1 p2 c0 {2,S}
2 O u1 p2 c0 {1,S}
"""),
)
species(
label = "Ar",
reactive = False,
structure = adjacencyList(
"""
1 Ar u0 p4 c0
"""),
)
species(
label = "HCl",
reactive = True,
structure = adjacencyList(
"""
1 Cl u0 p3 c0 {2,S}
2 H u0 p0 c0 {1,S}
"""),
)
simpleReactor(
temperature = (1173,"K"),
pressure = (1,"bar"),
initialMoleFractions={
"H2": 0.01,
"O2": 0.01,
"HCl": 0,
"CH3Cl": 0.02,
"Ar": 0.96,
},
terminationTime = (2,"s"),
sensitivity = ['CH3Cl', 'HCl'],
sensitivityThreshold = 0.001,
)
simulator(
atol = 1e-16,
rtol = 1e-08,
sens_atol = 1e-06,
sens_rtol = 0.0001,
)
model(
toleranceMoveToCore = 1e-06,
toleranceKeepInEdge = 0,
toleranceInterruptSimulation = 1,
maximumEdgeSpecies = 100000,
minCoreSizeForPrune = 50,
minSpeciesExistIterationsForPrune = 2,
filterReactions = True,
)
options(
units = "si",
saveRestartPeriod = None,
generateOutputHTML = True,
generatePlots = False,
saveSimulationProfiles = True,
saveEdgeSpecies = True,
keepIrreversible = None,
verboseComments = True,
)
Thanks Matt
The problem seems to be that the filter simulation is failing. In #1371 I've added a try except that allows model runs to continue after filter simulations error, which fixes the issue in the sense that the run behaves as intended. However, this doesn't help your run specifically because it never recovers and the resurrection process just grabs species out of the edge until there aren't any left at which point it errors as expected.
Closing with merge of #1371
Is this has been solved. I have got exact same error for nitogen containing species.
The issue is solved in the sense that the error occurs when expected. We expect this error to occur if RMG repeatedly fails to solve a reactor. This error almost always indicates a problem with the thermochemistry estimates, although it can also be an issue with the kinetic estimates.
I've added some chlorine rules etc to my database (as discussed a bit in https://github.com/ReactionMechanismGenerator/RMG-database/pull/257 - will open a PR once we have it closer to working), and I am trying to build a model for chloromethane combustion. After one iteration it fails:
I think the step size of 0.7e-38 seconds and the rate of 2.9e+23 are the cause of the problem, caused by bad kinetics estimates from my database (maybe bad thermo causing a fast reverse reaction), but can anyone help me understand what the
ValueError: invalidObjects could not be filled during resurrection process
means?