Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging the incorrect reactor conditions for range (surface) reactors. #1710

Closed
rwest opened this issue Aug 27, 2019 · 2 comments
Closed

Logging the incorrect reactor conditions for range (surface) reactors. #1710

rwest opened this issue Aug 27, 2019 · 2 comments
Labels
abandoned abandoned issue/PR as determined by actions bot Complexity: Low Good First Issue stale stale issue/PR as determined by actions bot

Comments

@rwest
Copy link
Member

rwest commented Aug 27, 2019

Bug Description

Running a job with a temperature range on a surface reactor, i.e.

surfaceReactor(
    temperature=[(400,'K'),(2400,'K')],
    initialPressure=(1.0, 'bar'),
    nSims = 6,
    initialGasMoleFractions={
        'CH3OH': 0.16,
        (some rows deleted)
        'H2O': 0.04,
    },
    initialSurfaceCoverages={
        "X": 1.0,
    },
    surfaceVolumeRatio=(1.e5, 'm^-1'),
    terminationConversion = { "CH3OH": 0.95,},
    terminationTime=(10., 's'),
    terminationRateRatio=0.01,
)

near the beginning of the log file it reports

Warning: Initial gas mole fractions do not sum to one; renormalizing.


Surface reaction system 1
Gas phase mole fractions:
  H2O                  0.042553
  (some rows deleted)
  CH3OH                0.17021
Total gas phase:          1 moles
Pressure:                 1e+05 Pa
Temperature:              2.17222323179e-314 K
Reactor volume:           1.81e-318 m3
Surface/volume ratio:     1e+05 m2/m3
Surface site density:     2.9e-05 mol/m2
Surface sites in reactor: 5.24e-318 moles
Initial surface coverages (and amounts):
  X                  1 = 5.2376e-318 moles

The Temperature and Reactor volume lines are clearly incorrect and misleading.
It would be better to print something helpful here.

Hopefully, the reactors are in fact doing the correct thing, but this should probably also be checked.

How To Reproduce

Run a job with catalytic chemistry and a surface reactor using a range for Temperature (and perhaps the other range reactors too).
I've not checked behaviour for Simple reactors, but the bug may be there also.

Expected Behavior

The log file would tell you what it's doing and not mislead you with worrying numbers like T=2.17222323179e-314 K.

Installation Information

Describe your installation method and system information.

Additional Context

It might be nice, when running range reactors, if each Simulation told you what conditions it was starting at before it starts running.

@rwest
Copy link
Member Author

rwest commented Jan 5, 2020

I was just about to open a new issue for this, and came across this one, so will paste here as a comment instead.

This is the section of my current input file:

surfaceReactor(
    temperature=[(400,'K'),(2000,'K')],
    initialPressure=(1.0, 'bar'),
    nSims = 6,
    initialGasMoleFractions={
        'gas1': 0.14,
        'gas2': 0.3,
        'gas3': 0.3,
        'gas4': 0.16,
        'gas5': 0.04,
    },
    initialSurfaceCoverages={
        "X": 1.0,
    },
    surfaceVolumeRatio=(1.e5, 'm^-1'),
    terminationConversion = { "gas1": 0.95,},
    terminationTime=(10., 's'),
    terminationRateRatio=0.01,
)

Near the start of the RMG log, is this:

Surface reaction system 1
Gas phase mole fractions:
  NH2NHOOH             0.14894
  NH2OH                0.31915
  HNO3                 0.31915
  CH3OH                0.17021
  H2O                  0.042553
Total gas phase:          1 moles
Pressure:                 1e+05 Pa
Temperature:              0.0 K
Reactor volume:           0 m3
Surface/volume ratio:     1e+05 m2/m3
Surface site density:     2.9e-05 mol/m2
Surface sites in reactor: 0 moles
Initial surface coverages (and amounts):
  X                  1 = 0 moles

It may just be a problem with the logging, and the simulations are all OK, but the calculation of surface site ratio seems to be starting with 1 mole of gas, then using a temperature of 0 K which leads to a volume of 0 m3 and hence a surface area of 0 m2 and a surface site balance of 0 moles.

Hopefully it's only the calculations that end up in the log file that needs fixing, but it's still a bug. We should also check the actual reactors are doing The Right Thing.

  • RMG version information: 3.0 current master. 957ee80

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned abandoned issue/PR as determined by actions bot Complexity: Low Good First Issue stale stale issue/PR as determined by actions bot
Projects
None yet
Development

No branches or pull requests

2 participants