aquakin.MixerUnit#
- class aquakin.MixerUnit(name, input_port_names, model)[source]#
Bases:
StatelessUnitCombines two or more input streams into a single output stream by mass balance:
Q_out = sum(Q_in_i),C_out = sum(Q_in_i * C_in_i) / Q_out.Stateless. All input streams must reference the same kinetic model (translators are applied upstream by the plant).
- Parameters:
name (str) – Unit identifier.
input_port_names (list[str]) – Names of the input ports. Order is not significant for the computation, but the plant uses them when wiring connections.
model (CompiledModel) – Model of all input streams and the single output stream.
- __init__(name, input_port_names, model)#
- Parameters:
name (str)
input_port_names (list[str])
model (CompiledModel)
- Return type:
None
Methods
__init__(name, input_port_names, model)compute_outputs(t, state, inputs, params[, ...])coupling_pattern()No state -> no structural Jacobian contribution.
flow_outputs(input_flows, params[, ctx])Output port flows from input port flows (the linear flow rule).
initial_state()rhs(t, state, inputs, params[, signals])Attributes
input_portsoutput_portsstate_sizenameinput_port_namesmodel- flow_outputs(input_flows, params, ctx=None)[source]#
Output port flows from input port flows (the linear flow rule).
Used by
Plantto resolve the recycle-flow network cheaply and exactly, decoupled from the (expensive) concentration computation.- Parameters:
input_flows (dict)
params (Array)
- Return type:
dict