ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
376 stars 226 forks source link

DASPK Error #550

Closed ghost closed 1 year ago

ghost commented 8 years ago

Job crashed with the following error message: pydas.daspk.DASPKError: DASPK returned with an IDID = -6, Repeated error test failures occurred on the last attempted step in DDASPK. A singularity in the solution may be present. If you are absolutely certain you want to continue, you should restart the integration. (Provide initial values of Y and YPRIME which are consistent.) I was running using the new enlargeReactionFilter. I am going to try playing around with the atol and rtol values to try to solve the issue.

connie commented 8 years ago

Can you provide an input.py file so we can see if the problem is replicable?

ghost commented 8 years ago

decane.txt

database(
    thermoLibraries = ['KlippensteinH2O2','primaryThermoLibrary','DFT_QCI_thermo','CBS_QB3_1dHR'],
    reactionLibraries = [],
    seedMechanisms = ['KlippensteinH2O2','ERC-FoundationFuelv0.9'],
    kineticsDepositories = 'default', 
    kineticsFamilies = 'default',
    kineticsEstimator = 'rate rules',
)
species(
    label='decane',
    reactive=True,    
    structure=SMILES("CCCCCCCCCC"),
)
species(
    label='O2',
    structure=SMILES("[O][O]"),
)
species(
    label='N2',
    reactive=False,
    structure=adjacencyList("""
    1 N u0 p1 c0 {2,T}
    2 N u0 p1 c0 {1,T}
    """),
)
species(
    label='CO2',
    reactive=True,
    structure=SMILES("O=C=O")
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(20.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(600,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(900,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./15.5,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./31.0,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simpleReactor(
    temperature=(1200,'K'),
    pressure=(40.0,'atm'),
    initialMoleFractions={
    "N2": 4,
    "O2": 1,
    "decane": 1./7.75,
    },
    terminationConversion={'decane': .99,},
    terminationTime=(40,'s'),
)
simulator(
    atol=1e-18,
    rtol=1e-10,
)
model(
    toleranceMoveToCore=0.1,
    toleranceKeepInEdge=0,
    toleranceInterruptSimulation=0.1,
    maximumEdgeSpecies=100000,
    minCoreSizeForPrune=10000,
    minSpeciesExistIterationsForPrune=2,
)
options(
    units='si',
    saveRestartPeriod=(1,'day'),
    generateOutputHTML=True,
    generatePlots=False,
    saveSimulationProfiles=True,
    verboseComments=False,
    saveEdgeSpecies=False,
)
pressureDependence(
    method='modified strong collision',
    maximumGrainSize=(0.5,'kcal/mol'),
    minimumNumberOfGrains=250,
    temperatures=(300,2200,'K',2),
    pressures=(0.01,100,'bar',3),
    interpolation=('Chebyshev', 6, 4),
    maximumAtoms=15,
)
generatedSpeciesConstraints(
    allowed=['input species','seed mechanisms','reaction libraries'],
    maximumCarbonAtoms=12,
    maximumHydrogenAtoms=26,
    maximumOxygenAtoms=7,
    maximumNitrogenAtoms=0,
    maximumSiliconAtoms=0,
    maximumSulfurAtoms=0,
    maximumRadicalElectrons=3,
)
nickvandewiele commented 8 years ago

contents of decane.txt:

# Data sources
database(
    #overrides RMG thermo calculation of RMG with these values.
    #libraries found at http://rmg.mit.edu/database/thermo/libraries/
    #if species exist in multiple libraries, the earlier libraries overwrite the 
    #previous values
    thermoLibraries = ['KlippensteinH2O2','primaryThermoLibrary','DFT_QCI_thermo','CBS_QB3_1dHR'],
    #overrides RMG kinetics estimation if needed in the core of RMG. 
    #list of libraries found at http://rmg.mit.edu/database/kinetics/libraries/
    #input each library as a ('library_name',True/False) where a True means that all 
    #unused reactions will be automatically added to the chemkin file
    reactionLibraries = [],
    #seed mechanisms are reactionLibraries that are forced into the initial mechanism 
    #in addition to species listed in this input file.  
    #This is helpful for reducing run time for species you know will appear in 
    #the mechanism.  
    seedMechanisms = ['KlippensteinH2O2','ERC-FoundationFuelv0.9'],
    #this is normally not changed in general RMG runs.  Usually used for testing with 
    #outside kinetics databases
    kineticsDepositories = 'default', 
    #lists specific families used to generate the model. 'default' uses a list of 
    #families from RMG-Database/input/families/recommended.py
    #a visual list of families is available in PDF form at RMG-database/families
    kineticsFamilies = 'default',
    #specifies how RMG calculates rates.  currently, the only option is 'rate rules'
    kineticsEstimator = 'rate rules',
)

# List of species
#list initial and expected species below to automatically put them into the core mechanism.  
#'structure' can utilize method of SMILES("put_SMILES_here"), 
#adjacencyList("""put_adj_list_here"""), or InChI("put_InChI_here")
#for molecular oxygen, use the smiles string [O][O] so the triplet form is used
species(
    label='decane',
    reactive=True,      #this parameter is optional if true
    structure=SMILES("CCCCCCCCCC"),
)
species(
    label='O2',
    structure=SMILES("[O][O]"),
)
species(
    label='N2',
    reactive=False,
    structure=adjacencyList("""
    1 N u0 p1 c0 {2,T}
    2 N u0 p1 c0 {1,T}
    """),
)
# You can list species not initially in reactor to make sure RMG includes them in the mechanism
#species(
#    label='QOOH',
#    reactive=True,
#    structure=SMILES("OOCC[CH]C")
#)
species(
    label='CO2',
    reactive=True,
    structure=SMILES("O=C=O")
)

#Reaction systems
#currently RMG models only constant temperature and pressure as homogeneous batch reactors.  
#two options are: simpleReactor for gas phase or liquidReactor for liquid phase
#use can use multiple reactors in an input file for each condition you want to test.  
simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(20.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(600,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(900,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./15.5,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./31.0,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

simpleReactor(
    #specifies reaction temperature with units
    temperature=(1200,'K'),
    #specifies reaction pressure with units
    pressure=(40.0,'atm'),
    #list initial mole fractions of compounds using the label from the 'species' label.  
    #RMG will normalize if sum/=1
    initialMoleFractions={
        "N2": 4,
        "O2": 1,
        "decane": 1./7.75,
    },
    #the following two values specify when to determine the final output model
    #only one must be specified
    #the first condition to be satisfied will terminate the process
    terminationConversion={
        'decane': .99,
    },
    terminationTime=(40,'s'),
    #the next two optional values specify how RMG computes sensitivities of 
    #rate coefficients with respect to species concentrations.  
    #sensitivity contains a list of species' labels to conduct sensitivity analysis on.
    #sensitvityThreshold is the required sensitiviy to be recorded in the csv output file
#    sensitivity=['CH4'],
#    sensitivityThreshold=0.0001,
)

# liquidReactor(
#   temperature=(500,'K'),
#     initialConcentrations={
#       "N2": 4,
#       "O2": 1,
#       "CO": 1,
#     },
#     terminationConversion=None,
#     terminationTime=(3600,'s'),
#     sensitivity=None,
#     sensitivityThreshold=1e-3
# )
    #liquid reactors also have solvents, you can specify one solvent
    #list of solvents available at : http://rmg.mit.edu/database/solvation/libraries/solvent/
# solvation('water')

#determines absolute and relative tolerances for ODE solver and sensitivities.
#normally this doesn't cause many issues and is modified after other issues are
#ruled out
simulator(
    atol=1e-18,
    rtol=1e-10,
#    sens_atol=1e-6,
#    sens_rtol=1e-4,
)

#used to add species to the model and to reduce memory usage by removing unimportant additional species.
#all relative values are normalized by a characteristic flux at that time point
model(
    #determines the relative flux to put a species into the core.  
    #A higher value will result in a larger, more complex model
    #when running a new model, it is recommended to start with higher values and then decrease to converge on the model
    toleranceMoveToCore=0.1,
    #comment out the next three terms to disable pruning
       #determines the relative flux needed to not remove species from the model.  
       #Lower values will keep more species and utilize more memory
    toleranceKeepInEdge=0,
       #determines when to stop a ODE run to add a species.  
       #Lower values will improve speed. 
       #if it is too low, may never get to the end simulation to prune species.  
    toleranceInterruptSimulation=0.1,
       #number of edge species needed to accumulate before pruning occurs
       #larger values require more memory and will prune less often
    maximumEdgeSpecies=100000,
        #minimum number of core species needed before pruning occurs.
        #this prevents pruning when kinetic model is far away from completeness
    minCoreSizeForPrune=10000,
        #make sure that the pruned edge species have existed for a set number of RMG iterations.  
        #the user can specify to increase it from the default value of 2
    minSpeciesExistIterationsForPrune=2,

)

options(
    #only option is 'si'
    units='si',
    #how often you want to save restart files.  
    #takes significant amount of time. comment out if you don't want to save 
    saveRestartPeriod=(1,'day'),
    #Draws images of species and reactions and saves the model output to HTML.  
    #May consume extra memory when running large models.
    generateOutputHTML=True,
    #generates plots of the RMG's performance statistics. Not helpful if you just want a model.
    generatePlots=False,
    #saves mole fraction of species in 'solver/' to help you create plots
    saveSimulationProfiles=True,
    #gets RMG to output comments on where kinetics were obtained in the chemkin file.  
    #useful for debugging kinetics but increases memory usage of the chemkin output file
    verboseComments=False,
    #gets RMG to generate edge species chemkin files. Uses lots of memory in output.
    #Helpful for seeing why some reaction are not appearing in core model.  
    saveEdgeSpecies=False,
)

# optional module allows for correction to unimolecular reaction rates at low pressures and/or temperatures.
pressureDependence(
    #two methods available: 'modified strong collision' is faster and less accurate than 'reservoir state'
    method='modified strong collision',
    #these two categories determine how fine energy is descretized.
    #more grains increases accuracy but takes longer
    maximumGrainSize=(0.5,'kcal/mol'),
    minimumNumberOfGrains=250,
    #the conditions for the rate to be output over
    #parameter order is: low_value, high_value, units, internal points
    temperatures=(300,2200,'K',2),
    pressures=(0.01,100,'bar',3),
    #The two options for interpolation are 'PDepArrhenius' (no extra arguments) and 
    #'Chebyshev' which is followed by the number of basis sets in 
    #Temperature and Pressure. These values must be less than the number of 
    #internal points specified above
    interpolation=('Chebyshev', 6, 4),
    #turns off pressure dependence for molecules with number of atoms greater than the number specified below
    #this is due to faster internal rate of energy transfer for larger molecules
    maximumAtoms=15,
 )

#optional block adds constraints on what RMG can output.  
#This is helpful for improving the efficiency of RMG, but wrong inputs can lead to many errors.
generatedSpeciesConstraints(
    #allows exceptions to the following restrictions
    allowed=['input species','seed mechanisms','reaction libraries'],
    #maximum number of each atom in a molecule
    maximumCarbonAtoms=12,
    maximumHydrogenAtoms=26,
    maximumOxygenAtoms=7,
    maximumNitrogenAtoms=0,
    maximumSiliconAtoms=0,
    maximumSulfurAtoms=0,
    #max number of non-hydrogen atoms
    #maximumHeavyAtoms=20,
    #maximum radicals on a molecule
    maximumRadicalElectrons=3,
    #If this is false or missing, RMG will throw an error if the more less-stable form of O2 is entered 
    #which doesn't react in the RMG system. normally input O2 as triplet with SMILES [O][O]
    #allowSingletO2=False,
)

#optional block allows thermo to be estimated through quantum calculations
# quantumMechanics(
#   #the software package for calculations...can use 'mopac' or 'gaussian' if installed
#   software='mopac',
#   #methods available for calculations. 'pm2' 'pm3' or 'pm7' (last for mopac only)        
#   method='pm3',
#   #where to store calculations
#   fileStore='QMfiles',
#   #where to store temporary run files
#   scratchDirectory = None,
#   #onlyCyclics allows linear molecules to be calculated using bensen group addivity....need to verify
#   onlyCyclics = True,
#   #how many radicals should be utilized in the calculation.  
#   #If the amount of radicals is more than this, RMG will use hydrogen bond incrementation method
#   maxRadicalNumber = 0,
# )
connie commented 8 years ago

@sherman-sc How long did it run before it failed?

ghost commented 8 years ago

I believe it ran for a few hours

rwest commented 8 years ago

I would suggest an exception handler that for now pickles and saves the model (or just triggers the restart saving feature) when there's an ODE solver error. Hopefully when the errors are better understood we can then make it recover from some of them, and/or deduce and report which reactions caused the problem.

chiyw13 commented 7 years ago

@rwest thinks that #1046 may address this issue, but it is dependent on #996 and #969 built on the new expansion algorithm #864. Not sure if something similar can be done on the master? (or if all the above will be merged soon?)

github-actions[bot] commented 1 year ago

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.

JacksonBurns commented 1 year ago

The mentioned PRs were merged, closing this as resolved.