Skip to content

Latest commit

 

History

History
115 lines (72 loc) · 5.5 KB

sidor_methods.rst

File metadata and controls

115 lines (72 loc) · 5.5 KB

Reactive Single Inlet - Double Outlet Helper Methods

pair: watertap.core.zero_order_sido_reactive;build_sido_reactive

watertap.core.zero_order_sido_reactive

The build_sido_reactive method is intended to be used to rapidly construct a standard set of material balance equations for zero-order type models with a single inlet and two outlets that involve chemical reactions (i.e. units that involve both reaction and separation).

Usage

from idaes.core import declare_process_block_class from watertap.core import build_sido_reactive, ZeroOrderBaseData

@declare_process_block_class("ReactiveSeparationZO") class ReactiveSeparationZOData(ZeroOrderBaseData):

CONFIG = ZeroOrderBaseData.CONFIG()

def build(self):

super().build()

self._tech_type = "reactive_separation"

build_sido_reactive(self)

Model Structure

The build_sido_reactive method constructs a simple representation of unit operation with a single inlet (named inlet) and two outlets (named treated and byproduct). A StateBlock is constructed for the inlet and each outlet with a Port associated with each of these.

Variables

The build_sido_reactive method creates the following variables in addition to those created by the StateBlocks.

Variable Name Indices Notes
rt recovery_frac_mass_H2O time Fraction of mass flow of water in inlet that goes to treated stream.
ft, j removal_frac_mass_comp time, component Fraction of mass flow of each component that goes to byproduct stream.
Xt, r reaction_conversion time, reaction Fractional conversion of key reactant via reaction r.
ξt, r extent_of_reaction time, reaction Extent of reaction r in kg/s.

Parameters

The build_sido_reactive method introduces a single indexed parameter.

Parameter Name Indices Notes
νr, j generation_ratio reaction, component Mass conversion ratio for component j in reaction r w.r.t. key reactant.

Note that νr, j should be negative for reactants and positive for products. Generation ratio can either be specified directly as a parameter, or by providing stoichiometric coefficients and molecular weights for each component.

Expressions

The build_sido_reactive method creates an Expression for the generation of each species in each reaction.

Parameter Name Indices Notes
Gt, r, j generation_rxn_comp time, reaction, component Mass generation for component j in reaction r.


Gt, r, j = νr, j × ξt, r

Constraints

The build_sido method writes the following constraints which relate the inlet state to those in the treated and byproduct streams. First, a constraint for the extent of reaction is written:


ξt, r = Xt, r × Min, t, key

where Mt, key is mass flowrate of the key reactant for the reaction at time t.

Next, a mass recovery equation for water is written to relate the flowrate at the treated outlet to that at the inlet. Note that recovery is applied after any reactions have occurred.

`water_recovery_equation(t)`:


rt × (Minlet, t, H2O + ∑Gt, r, H2Or) = Mtreated, t, H2O

Next, a mass balance for water is written to relate the flowrate in the byproduct stream to that in the inlet and treated streams.

`flow_balance(t)`:


Minlet, t, H2O + ∑Gt, r, H2Or = Mtreated, t, H2O + Mbyproduct, t, H2O

Removal constraints are then written for each solute to relate the solute concentration in the byproduct stream to that in the inlet stream. Again, removal is applied after any reactions have occured.

`solute_removal_equation(t, j)`:


ft, j × (Minlet, t, j + ∑Gt, r, jr) = Mbyproduct, t, j

A mass balance constraint is then written for each solute.

`solute_treated_equation(t, j)`:


Minlet, t, j + ∑Gt, r, jr = Mtreated, t, j + Mbyproduct, t, j

Module Documentation

  • watertap.core.zero_order_sido_reactive