Files
reactor/README.md
2025-11-28 10:51:10 +00:00

1.6 KiB

Reactor: Advanced Hydraulic Tank & Biological Process Simulator

A comprehensive reactor class for wastewater treatment simulation featuring non-ideal plug flow hydraulics and ASM3 biological modeling.

How to use this Node

Set Node Properties

  • Set reactor type: Continuously Stirred Tank Reactor (CSTR) or Plug Flow Reactor (PFR)
  • Configure reactor sizing: Set reactor volume [ m^3 ] and (for PFRs) set the reactor length [ m ]
  • (For PFRs) set reactor spatial resolution: A value of 10 or 20 is good. A higher resolution means more accurate simulation, at higher computational expense. Note that connected reactors must have similar Δx values.
  • Set initial state of reactor: set the intial concentrations of all relevant reaction species.
  • (Optional) set k_L a to calculate OTR internally, rather than providing it explicitly, using simple mass transfer model.

Accepted Node inputs

  • { topic: clock, payload: <timestamp [ ms ]> } - required clock signal to make reactor update state.
  • { topic: Fluent, payload: { F: <flow rate [ m^3 d^{-1} ]>, C: <array with concentrations> } } - sets inflow composition and flow rate.
  • { topic: Dispersion, payload: <dispersion coefficient in [ m d^{-2} ]> } - sets PFR dispersion coefficient.
  • { topic: OTR, payload: <oxygen transfer rate [ g d^{-1} m^{-3} ]> } - sets current oxygen transfer rate.

Troubleshooting

Check for possible numerical warnings. These tell you which simulation parameters to change. If solutions appear to be oscillate, try reducing the time step. If solutions appear to be too dispersive, try increasing the reactor resolution.