Balances
Documentation TODO
This page is a work in progress.
fullflow.Balance
User-defined algebraic solve target.
Balance adds one extra solve equation to a Network by telling the solver to adjust one assignable State until a residual expression evaluates to zero.
A balance contributes one iteration variable and one residual equation to the global steady-state solve.
Parameters
| Name | Type | Description |
|---|---|---|
name | str | Balance name |
network | Network | Network that owns this balance |
variable | State | Non-derived state that the solver may modify |
function | callable or State | Residual expression to drive to zero |
bounds | tuple[float or None, float or None], optional | Fallback bounds for the solve variable |
keep_ | bool, optional | Whether bounded solvers should keep the variable inside bounds |
Iteration Variables
| Name | Type | Description |
|---|---|---|
variable | State | State adjusted by the solver |
Residuals
| Name | Type | Description |
|---|---|---|
residual | float | User-defined residual driven to zero by the solver function = 0 |