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

Dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface)? #61

Open
ischoegl opened this issue Aug 18, 2019 · 7 comments
Open
Labels
feature-request New feature request question Further information is requested

Comments

@ischoegl
Copy link
Member

Cantera version

2.5.0a3

Expected Behavior

A single approach for solving surface problems in the context of zero-dimensional simulations.

Actual Behavior

There appear to be two distinct approaches to simulate surface kinetics problems.

  • InterfaceKinetics
  • Reactor + ReactorSurface object in a reactor network
  • Time integration is handled by two completely separate functions (advance_coverages vs advance).

Proposal

It is conceivable to merge the approaches by introducing something along the lines of

Example 1: diamond_cvd.py

g, dbulk = ct.import_phases('diamond.cti', ['gas', 'diamond'])
d = ct.Interface('diamond.cti', 'diamond_100')
gas = ct.Reservoir(g)
solid = ct.Reactor(dbulk)
surf = ct.Surface(d, [gas, solid])

sim = ct.ReactorNet([solid, surf])
sim.advance(some_end_time)

Example 2: surf_pfr.py

gas = ct.Solution('methane_pox_on_pt.cti', gas)
surf = ct.Interface('methane_pox_on_pt.cti', 'Pt_surf')
reactor = ct.IdealGasReactor(gas)
surf = ct.Surface(d, [reactor])
# skipping inlet/outlet plumbing for brevity

sim = ct.ReactorNet([reactor, surf])
sim.advance_to_steady_state()

There are obviously other scenarios, e.g. edges / triple phase boundaries.

The steps to allow for this would require some changes of ReactorBase-derived classes, but would eliminate redundancies in the long run.

An advantage of this approach would be that only one time integration approach needs to be maintained. Further, any future serialization would use the same framework.

@ischoegl ischoegl reopened this Aug 18, 2019
@speth
Copy link
Member

speth commented Sep 16, 2019

I agree that there is a bit of redundancy here that would be nice to get rid of, but there are some differences between the two that need to be considered.

First, the problem solved by InterfaceKinetics, using either the advanceCoverages or solvePseudoSteadyStateProblem methods, assumes that the state of the other participating phases (e.g. the gas phase) is constant, while in the ReactorNet approach, the state of these phases is assumed to vary. Currently, I think that setting chemistry to disabled for a reactor will only affect the gas phase reactions, with surface reactions still changing gas phase concentrations, and in any case, the system of equations will still contain all of the gas phase species, which is inefficient if you're only trying to solve for the surface species.

Second, the pseudo-steady state solver available for the surface-only problem is quite different from anything we have available for the general reactor network. However, "different" may mostly mean broken in this case (see Cantera/cantera#609).

@ischoegl
Copy link
Member Author

@speth ... thanks for your response. It's been a while since I wrote this question, but the main point of my inquiry was that InterfaceKinetics goes against the philosophy of some of the other implementations within the 0D ReactorNet approaches. This came up in the context of Cantera/cantera#694.
Regarding your first comment: a Surface attached to a Reservoir would be computationally as efficient as advanceCoverages (I haven't checked: this may or may not be possible at the moment.) Regarding the pseudo-steady state solver: this would imho benefit any other 0D scenario?

@speth
Copy link
Member

speth commented Sep 16, 2019

Conceptually, I can see how Reservoir + Surface corresponds to the problem solved by InterfaceKinetics.advance_coverages, but it's not actually implemented that way currently -- I don't think that any equations will be solved for the surface species if you add a Surface to a Reservoir.

And yes, the pseudo-steady state solver would be useful if it worked reliably, but it doesn't seem to do that currently. I also wonder whether that solver could just be replaced by the one used for 1D problems.

@ischoegl
Copy link
Member Author

Yes - Surface objects currently cannot stand by themselves as they add their species list to an existing Reactor, which imho is quite limiting.

@ischoegl ischoegl reopened this Apr 12, 2020
@ischoegl

This comment has been minimized.

@bryanwweber bryanwweber transferred this issue from Cantera/cantera Jul 11, 2020
@ischoegl

This comment has been minimized.

@bryanwweber bryanwweber added feature-request New feature request question Further information is requested labels Jul 20, 2020
@ischoegl ischoegl changed the title Question: dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface) Avoid dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface) Jul 21, 2020
@ischoegl ischoegl changed the title Avoid dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface) Dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface)? Apr 3, 2021
@ischoegl ischoegl closed this as completed Apr 3, 2021
@ischoegl
Copy link
Member Author

Reopening based on recent discussion in #202.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants