DIDOBlock¶
- class flexops.unit_models.base.dido.DIDOBlock(*args, **kwds)¶
Bases:
ProcessBlock- Parameters:
rule (function) – A rule function or None. Default rule calls build().
concrete (bool) – If True, make this a toplevel model. Default - False.
ctype (class) –
Pyomo ctype of the block. Default - pyomo.environ.Block
Config args
- dynamic
Indicates whether this model will be dynamic or not, default = useDefault. Valid values: { useDefault - get flag from parent (default = False), True - set as a dynamic model, False - set as a steady-state model.}
- has_holdup
Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { useDefault - get flag from parent (default = False), True - construct holdup terms, False - do not construct holdup terms}
- property_package
Property (parameter) block carrying flow between units; None for units that need no fluid properties.
- flexops_config
Optional already-validated UnitConfig for this unit (never a raw dict).
- unit_commitment
Per-unit unit-commitment sub-config.
- external_dispatch
Optional external (DERMS) dispatch source consumed by set_external_dispatch.
- relaxation
Discrete-structure relaxation policy.
- allow_pass_through
Whether add_bypass_constraints() builds inlet-to-outlet pass-through equalities for this unit’s non-excluded state variables. SISOBlock (and its subclasses Pump/Tank) override the base default to True so the flow-topology units are well-posed out of the box; the base OpsBlock default stays False.
- costing_package
Optional FlexCosting block this unit associates with: register_power forwards the unit’s power draw to it. None for standalone units; the forwarding is strictly conditional.
- transfer_fraction
Fraction of stream a’s inlet flow that crosses into stream b (a fixed, regressable Var once built). 0.0 leaves the two streams independent.
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns:
(DIDOBlock) New instance
Variables
Name |
Index |
Units |
Role |
Description |
|---|---|---|---|---|
flow_vol_phase |
time |
m**3/h |
input |
Volumetric flowrate by time and phase |
flow_vol_phase |
time |
m**3/h |
input |
Volumetric flowrate by time and phase |
flow_vol_phase |
time |
m**3/h |
output |
Volumetric flowrate by time and phase |
flow_vol_phase |
time |
m**3/h |
output |
Volumetric flowrate by time and phase |
Constraints
Name |
Description |
|---|---|
mass_balance_a |
Stream a balance: outlet_a == (1 - transfer_fraction) * inlet_a. |
mass_balance_b |
Stream b balance: outlet_b == inlet_b + transfer_fraction * inlet_a. |
Degrees of Freedom
Name |
Units |
Description |
|---|---|---|
flow_vol_phase |
m**3/h |
Volumetric flowrate by time and phase |
flow_vol_phase |
m**3/h |
Volumetric flowrate by time and phase |