Simulation
After the governing partial differential equations (PDEs) are discretized in space (see Column Models and Unit Operations), the resulting system of Differential-Algebraic Equations (DAEs) can be assembled from all units and connections, and then integrated in time using an implicit or explicit solver.
Differential-Algebraic Equation Formulation
The solver assembles a monolithic DAE system from all units and connections:
where:
- — differential states (concentrations, bound phase)
- — algebraic states (Danckwerts inlet boundary conditions, detector pass-through)
- — parameters (inlet profile coefficients, constant per phase)
- — time
Differential-Algebraic Equation Assembly
The full DAE is assembled from individual unit contributions:
- Topological sort of units based on the connection graph — upstream units are processed before downstream ones.
- Per-unit equation building — each unit type contributes its own differential and algebraic states and equations.
- Inlet routing — for each unit, the inlet concentration and flow are resolved from upstream connections. When multiple upstream units feed into one unit, concentrations are mixed by flow-weighted average:
Time Integration Method
The DAE system is solved using IDAS, an implicit DAE solver that uses a variable-order, variable-step Backward Differentiation Formula (BDF) method with Newton iteration for the nonlinear systems at each time step.
| Parameter | Default | Description |
|---|---|---|
| Absolute tolerance | Absolute error tolerance | |
| Relative tolerance | Relative error tolerance | |
| Max steps | 50,000 | Maximum internal steps per output interval |
The Jacobian matrix is computed via automatic differentiation, preserving the sparsity structure from the finite volume discretization. This makes Newton iteration efficient even for large systems.
Phase-Based Integration
The simulation is divided into phases (sections), each with potentially different:
- Flow topology (connections between units)
- Inlet profiles (concentration and flow rate)
For each phase:
- A new DAE system is constructed with that phase's connections and inlet profiles.
- Initial conditions are taken from the end of the previous phase (or from unit defaults for the first phase).
- Integration proceeds over the phase duration.
- Results are appended to the output trajectory.
This allows the system topology to change between phases. For example, column switching or different gradient profiles or flow rates at different stages of the process.

