Skip to content

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
namestr

Balance name

networkNetwork

Network that owns this balance

variableState

Non-derived state that the solver may modify

functioncallable or State

Residual expression to drive to zero

boundstuple[float or None, float or None], optional

Fallback bounds for the solve variable

keep_feasiblebool, optional

Whether bounded solvers should keep the variable inside bounds

Iteration Variables

Name Type Description
variableState

State adjusted by the solver

Residuals

Name Type Description
residualfloat

User-defined residual driven to zero by the solver

function = 0