# Steady state calculation

### Calculation at a section

#### Integration using fourth-order Runge-Kutta méthod

Previous equation is rewriten as (where and ) and integrated using a fourth-order Runge-Kutta méthod(RK4) :

where :

• where and

Concentrations in section j+1 are therefore :

### Continuity equation at a node

The steady state mass balance at a node is :

#### Newton’s method

Let be the mass balance equation for the node on iteration i.

Newton’s method gives :

Is the node does not contain a pond, there is no source term and the equation is linear. If distribution coefficients , and are heterogeneous, they are adjusted before the first and only iteration.

If there is a pond, the equation is no longer linear and several iterations are needed but distribution coefficients are not adjusted.

The general equation for is :

where is the derivative of the exchange.

#### Calculation for a node with a pond

Some terms in the previous equation are constant and do not need to be recomputed on every iteration :

Which yields :

et

#### Calculation for a node without a pond

For a node without a pond, the node concentration is directly calculated as a pondered mean of inflow concentrations.

If the distribution coefficients are adjustable, is computed before the iterations, as described in "Network computation".