Lecture 8 brings together the implementation patterns needed for coupled multiphase reactor models. The emphasis is not a new finite-volume stencil, but how to assemble interacting domains and physical constraints into maintainable PyMRM models.
Learning Goals¶
After this lecture you should be able to:
identify when a reactor model needs monolithic coupling instead of sequential submodel calls;
assemble pressure, velocity, heat, and composition constraints in a single residual;
couple reactor-scale and particle-scale balances through boundary or film-transfer equations;
represent surface and membrane transfer as boundary/interface conditions; and
check coupled models using conservation, boundedness, residual norms, and physically expected trends.
Lecture Notebook¶
The lecture is organized around five notebooks.
| Part | Notebook | Coupling idea |
|---|---|---|
| 1 | 2D monolithic membrane module | Retentate and permeate domains are coupled by implicit membrane-interface equations. |
| 2 | 2D convection-diffusion with boundary surface reaction | A 2D bulk phase is coupled to surface coverages through a reactive boundary. |
| 3 | Coupling of a particle model to a reactor model | Reactor and pellet models exchange fluxes and boundary concentrations. |
| 4 | Reactor-particle coupling with Maxwell-Stefan film transfer | Multicomponent film transfer couples reactor and particle domains through Maxwell-Stefan transport. |
| 5 | Pressure-velocity coupled 2D fixed-bed reactor | Pressure, velocity, temperature, and composition are solved in one nonlinear model. |
Common Implementation Pattern¶
The notebooks use the same structure wherever possible:
define parameters and the array layout explicitly;
build grids and boundary-condition dictionaries before constructing operators;
assemble constant transport operators once;
keep nonlinear physics in small functions or methods;
solve through a residual that returns both the residual vector and Jacobian; and
validate with conservation, monotonicity, positivity, or limiting cases.
This mirrors the model style used throughout the course: spatial axes first, fields last, construct_grad, construct_div, and construct_convflux_upwind for finite-volume operators, and class-based models for reusable coupled PDE examples.
Validation Themes¶
The lecture examples should be read with the validation checks in mind:
membrane coupling: total retentate-plus-permeate molar flow is conserved;
surface coupling: surface-site fractions remain bounded and sum to one;
particle coupling: reactor-scale conversion responds correctly to particle resistance;
Maxwell-Stefan coupling: multicomponent film residuals and particle residuals close simultaneously; and
pressure-velocity coupling: ideal-gas consistency and moderate pressure drop.