Water problems are represented mathematically by differential equations. Examples of such problems or processes are propagation of waves in a river channel, pollutant transport, reservoir operations, and so on.
The general principle of conservation laws is that the rate of change of a quantity u within a volume V plus the flux of u through the boundary A (noted as f(u)) is the same as the rate of production of u, denoted by S(u,t):
Conservation of mass states that for any control volume, during a small time interval Δt, the mass entering the volume minus the mass leaving the volume equals the change of mass inside the control volume. For mass m of density ρ, and advection velocity u over the control volume V, this gives:
∂t∂∫Vρ⋅dV+∫A(ρ⋅u)⋅n⋅dA=0
f(u)=ρ⋅uandu⋅n=u
The term S is the source term, and since there is no mass production, S is zero. Integrating the preceding equation yields:
∂t∂ρ+∇(uρ)=0
Which can be re-arranged into the total-derivative (material derivative) form, using the nabla operator ∇=(∂x∂,∂y∂,∂z∂) and DtD=∂t∂+dtdx∂x∂+dtdy∂y∂+dtdz∂z∂: