diff --git a/examples/rmg/minimal_surface/input.py b/examples/rmg/minimal_surface/input.py index 5b45e1ee3d7..cd63227aab7 100644 --- a/examples/rmg/minimal_surface/input.py +++ b/examples/rmg/minimal_surface/input.py @@ -1,67 +1,125 @@ # Data sources database( - thermoLibraries = ['primaryThermoLibrary'], - reactionLibraries = [], + thermoLibraries=['surfaceThermoPt111', 'primaryThermoLibrary', 'thermo_DFT_CCSDTF12_BAC','DFT_QCI_thermo'], # 'surfaceThermoPt' is the default. Thermo data is derived using bindingEnergies for other metals + reactionLibraries = [('Surface/CPOX_Pt/Deutschmann2006_adjusted', False)], # when Ni is used change the library to Surface/Deutschmann_Ni seedMechanisms = [], kineticsDepositories = ['training'], - kineticsFamilies = 'default', + kineticsFamilies = ['surface', 'default'], kineticsEstimator = 'rate rules', ) - -# List of species +catalystProperties( + bindingEnergies = { + 'H': (-2.75368,'eV/molecule'), + 'C': (-7.02516,'eV/molecule'), + 'N': (-4.63225,'eV/molecule'), + 'O': (-3.81153,'eV/molecule'), + }, + surfaceSiteDensity=(2.483e-9, 'mol/cm^2'), + coverageDependence=False +) species( - label='ethane', + label='CH4', reactive=True, - structure=SMILES("CC"), + structure=SMILES("[CH4]"), ) - -# Reaction systems -simpleReactor( - temperature=(1350,'K'), - pressure=(1.0,'bar'), - initialMoleFractions={ - "ethane": 1.0, - }, - terminationConversion={ - 'ethane': 0.9, - }, - terminationTime=(1e6,'s'), +species( + label='O2', + reactive=True, + structure=adjacencyList( + """ +1 O u1 p2 c0 {2,S} +2 O u1 p2 c0 {1,S} +"""), ) - -simpleReactor( - temperature=(1000,'K'), - pressure=(1.0,'bar'), - initialMoleFractions={ - "ethane": 1.0, +species( + label='N2', + reactive=False, + structure=SMILES("N#N"), +) +species( + label='X', + reactive=True, + structure=adjacencyList("1 X u0"), +) +# added for training +species( + label='CO2X', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {3,D} + 2 O u0 p2 c0 {3,D} + 3 C u0 p0 c0 {1,D} {2,D} + 4 X u0 p0 c0 + """), +) +species( + label='COX', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {2,D} + 2 C u0 p0 c0 {1,D} {3,D} + 3 X u0 p0 c0 {2,D} + """), +) +species( + label='OX', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {2,D} + 2 X u0 p0 c0 {1,D} + """), +) +# If you would like to forbid the bidentate form of absorbed CO2 from your model, +# use the following `CO2_bidentate` forbidden structure +# forbidden( +# label='CO2_bidentate', +# structure=SMILES("O=C(*)O*"), +# ) +#---------- +# Reaction systems +surfaceReactor( + #temperature=[(600,'K'), (2000, 'K')], + #nSims=4, + temperature=(1000, 'K'), + initialPressure=(1.0, 'bar'), + initialGasMoleFractions={ + "CH4": 0.15, + "O2": 0.15, + "N2": 0.7, }, - terminationConversion={ - 'ethane': 0.9, + initialSurfaceCoverages={ + "X": 1.0, }, - terminationTime=(1e6,'s'), + surfaceVolumeRatio=(1.e5, 'm^-1'), + terminationConversion = { "CH4": 0.95,}, + terminationTime=(0.1, 's'), + terminationRateRatio=0.01, ) - - - simulator( - atol=1e-16, - rtol=1e-8, + atol=1e-18, + rtol=1e-12, ) - model( toleranceKeepInEdge=0.0, - toleranceMoveToCore=100.0, - toleranceInterruptSimulation=100.0, + toleranceMoveToCore=1e-1, + toleranceInterruptSimulation=0.1, maximumEdgeSpecies=100000, - toleranceMoveEdgeReactionToSurface=1.0, - toleranceMoveSurfaceReactionToCore=2.0, - toleranceMoveSurfaceSpeciesToCore=.001, - dynamicsTimeScale=(1.0e-10,'sec'), ) - options( units='si', - generateOutputHTML=True, - generatePlots=False, - saveEdgeSpecies=True, - saveSimulationProfiles=True, + generateOutputHTML=False, + generatePlots=False, # Enable to make plots of core and edge size etc. But takes a lot of the total runtime! + saveEdgeSpecies=False, + saveSimulationProfiles=False, +) +generatedSpeciesConstraints( + allowed=['input species','reaction libraries'], + maximumCarbonAtoms=2, + maximumOxygenAtoms=2, + maximumSurfaceSites=2, ) + + diff --git a/test/regression/minimal_surface/input.py b/test/regression/minimal_surface/input.py new file mode 100644 index 00000000000..cd63227aab7 --- /dev/null +++ b/test/regression/minimal_surface/input.py @@ -0,0 +1,125 @@ +# Data sources +database( + thermoLibraries=['surfaceThermoPt111', 'primaryThermoLibrary', 'thermo_DFT_CCSDTF12_BAC','DFT_QCI_thermo'], # 'surfaceThermoPt' is the default. Thermo data is derived using bindingEnergies for other metals + reactionLibraries = [('Surface/CPOX_Pt/Deutschmann2006_adjusted', False)], # when Ni is used change the library to Surface/Deutschmann_Ni + seedMechanisms = [], + kineticsDepositories = ['training'], + kineticsFamilies = ['surface', 'default'], + kineticsEstimator = 'rate rules', +) +catalystProperties( + bindingEnergies = { + 'H': (-2.75368,'eV/molecule'), + 'C': (-7.02516,'eV/molecule'), + 'N': (-4.63225,'eV/molecule'), + 'O': (-3.81153,'eV/molecule'), + }, + surfaceSiteDensity=(2.483e-9, 'mol/cm^2'), + coverageDependence=False +) +species( + label='CH4', + reactive=True, + structure=SMILES("[CH4]"), +) +species( + label='O2', + reactive=True, + structure=adjacencyList( + """ +1 O u1 p2 c0 {2,S} +2 O u1 p2 c0 {1,S} +"""), +) +species( + label='N2', + reactive=False, + structure=SMILES("N#N"), +) +species( + label='X', + reactive=True, + structure=adjacencyList("1 X u0"), +) +# added for training +species( + label='CO2X', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {3,D} + 2 O u0 p2 c0 {3,D} + 3 C u0 p0 c0 {1,D} {2,D} + 4 X u0 p0 c0 + """), +) +species( + label='COX', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {2,D} + 2 C u0 p0 c0 {1,D} {3,D} + 3 X u0 p0 c0 {2,D} + """), +) +species( + label='OX', + reactive=True, + structure=adjacencyList( + """ + 1 O u0 p2 c0 {2,D} + 2 X u0 p0 c0 {1,D} + """), +) +# If you would like to forbid the bidentate form of absorbed CO2 from your model, +# use the following `CO2_bidentate` forbidden structure +# forbidden( +# label='CO2_bidentate', +# structure=SMILES("O=C(*)O*"), +# ) +#---------- +# Reaction systems +surfaceReactor( + #temperature=[(600,'K'), (2000, 'K')], + #nSims=4, + temperature=(1000, 'K'), + initialPressure=(1.0, 'bar'), + initialGasMoleFractions={ + "CH4": 0.15, + "O2": 0.15, + "N2": 0.7, + }, + initialSurfaceCoverages={ + "X": 1.0, + }, + surfaceVolumeRatio=(1.e5, 'm^-1'), + terminationConversion = { "CH4": 0.95,}, + terminationTime=(0.1, 's'), + terminationRateRatio=0.01, +) +simulator( + atol=1e-18, + rtol=1e-12, +) +model( + toleranceKeepInEdge=0.0, + toleranceMoveToCore=1e-1, + toleranceInterruptSimulation=0.1, + maximumEdgeSpecies=100000, +) +options( + units='si', + generateOutputHTML=False, + generatePlots=False, # Enable to make plots of core and edge size etc. But takes a lot of the total runtime! + saveEdgeSpecies=False, + saveSimulationProfiles=False, +) +generatedSpeciesConstraints( + allowed=['input species','reaction libraries'], + maximumCarbonAtoms=2, + maximumOxygenAtoms=2, + maximumSurfaceSites=2, +) + + diff --git a/test/regression/minimal_surface/regression_input.py b/test/regression/minimal_surface/regression_input.py new file mode 100644 index 00000000000..785705e38c8 --- /dev/null +++ b/test/regression/minimal_surface/regression_input.py @@ -0,0 +1,67 @@ +options( + title = 'minimal_surface', + tolerance = 0.5, +) + +# observables +observable( + label = 'CH4', + structure=SMILES('C'), +) + +observable( + label = 'O2', + structure=SMILES('[O][O]'), +) + +observable( + label = 'X', + structure=adjacencyList( + """ +1 X u0 p0 c0 +"""), +) + + +# List of species +species( + label='CH4', + structure=SMILES("[CH4]"), +) +species( + label='O2', + structure=adjacencyList( + """ +1 O u1 p2 c0 {2,S} +2 O u1 p2 c0 {1,S} +"""), +) +species( + label='N2', + structure=SMILES("N#N"), +) +species( + label='X', + structure=adjacencyList( + """ +1 X u0 p0 c0 +"""), +) + + +# reactor setups +reactorSetups( + reactorTypes=['IdealGasReactor'], + terminationTimes=([1.0], 's'), + initialMoleFractionsList=[{ + 'CH4': 0.15, + 'O2': 0.15, + 'N2': 0.7, + }], + initialSurfaceMoleFractionsList=[{ + 'X': 1.0, + }], + + temperatures=([1000.0], 'K'), + pressures=([1.0], 'bar'), +)