**Note:** The Keep and Dampen options and their effect on the four main terms of the St Venant equation.

The four terms are are used in the new flow for a time step of Qnew:

**Qnew** = (Qold – dq2 + dq3 + dq4) / ( 1 + dq1)

when the force main or gravity main is full dq3 and dq4 are zero and **Qnew** = (Qold – dq2) / ( 1 + dq1)

The **dq4** term in dynamic.c uses the area upstream (**a1**) and area downstream (**a2**), the midpoint velocity, the sigma factor (a function of the link Froude number), the link length and the time step or

**dq4 **= Time Step * Velocity * Velocity * (a2 – a1) / Link Length * Sigma

where Sigma is a function of the Froude Number and the Keep, Dampen and Ignore Inertial Term Options. Keep sets Sigma to 1 always and Dampen set Sigma based on the Froude number, Ignore sets Sigma to 0 all of the time during the simulation

the dq3 term in dynamic.c uses the current midpoint area (a function of the midpoint depth), the sigma factor and the midpoint velocity.

**dq3** = 2 * Velocity * ( Amid(current iteration) – Amid (last time step) * Sigma

**dq1** = Time Step * RoughFactor / Rwtd^1.333 * |Velocity|

The weighted area (**Awtd**) is used in the dq2 term of the St. Venant equation:

**dq2** = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length or

**dq2** = Time Step * Awtd * (Head Downstream – Head Upstream) / Link Length

Normally, dq1 (Friction Loss / Maroon in the Graph) balances dq2 (Water Surface Slope Term or Green in the Graph) but often for links with a large difference between upstream and downstream depths dq4 (Red in the Graph) can have a significant value. If dq4 or dq3 are important then the depth of water to increases to pass the same flow using the Keep option over the Ignore. If you have a link with a Froude number near or over 1.0 (Supercritical) then using Keep or Dampen for the Options may result in depth differences. The effect of Keep is to increase the “loss” terms in the St Venant Equation. The effect of Dampen and Ignore is to decrease the sum of the “loss” terms in the St. Venant Solution and lower the simulated depth.