> For the complete documentation index, see [llms.txt](https://swatplus.gitbook.io/io-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swatplus.gitbook.io/io-docs/theoretical-documentation/section-8-water-bodies/nutrients-in-water-bodies/total-balance.md).

# Total Balance

Assuming that the volume of the water body remains constant over time, the processes described above (inflow, settling, outflow) can be combined into the following mass balance equation for a well-mixed water body:

&#x20;     $$V\*\frac{dc}{dt}=W(t)-Q*c-v*c\*A\_s$$                                             8:3.2.1

where $$V$$ is the volume of the system (m$$^3$$ H$$\_2$$O), $$c$$ is the concentration of nutrient in the system (kg/m$$^3$$ H$$\_2$$O), $$dt$$ is the length of the time step (1 day), $$W(t)$$ is the amount of nutrient entering the water body during the day (kg/day), $$Q$$ is the rate of water flow exiting the water body (m$$^3$$ H$$\_2$$O/day), $$v$$ is the apparent settling velocity (m/day), and $$A\_s$$ is the area of the sediment-water interface (m$$^2$$).
